uTorrent LCD Smartie Plugin Module Author ------ Cosenodefi Email ----- jrlaguardia@gmail.com Requirements: ------------- .NET Framework v1.1 LCD Smartie v5.3+ Description ----------- The module has three functions. The first one retrieves the data of the specified torrent and field. The second one retrieves several global data of the torrent files. And the third one shows an about info string. * Function 1 (TORRENT STATS): Display torrent values The parameters are: Number of the torrent (0=First Torrent, 1=Second Torrent, ...) Number of the field (Valid range: 0-18) index field 0 - hashvalue 1 - status 2 - torrentname 3 - size (in GBytesMBytes/KBytes) 4 - completed % 5 - downloaded (in GBytes/MBytes/KBytes) 6 - uploaded (in GBytesMBytes/KBytes) 7 - ratio % 8 - upload (in KBytes/s) 9 - download (in KBytes/s) 10 - eta (in days,hours,mins,sec) See note. 11 - label 12 - connected peers 13 - peers in swarm 14 - connected seeds 15 - seeds in swarm 16 - availability (in 1/65536th) 17 - number of order 18 - remaining bytes (in GBytesMBytes/KBytes) * Function 2 (TORRENT GLOBALS): Display several global values The parameters are: Option value to be retrieved (Valid range: 0-7) -Ignored- Option Returns 0 - Total number of torrents 1 - Total number of ACTIVE torrents 2 - Total number of COMPLETED torrents 3 - Total bytes to download 4 - Total bytes downloaded 5 - Total bytes uploaded 6 - Total upload speed 7 - Total download speed * Function 3 (ABOUT info): Displays a 'about of' string It takes no parameters (they are ignored) Note: If ETA value shows a '---' string, it means that the torrent is done/stopped/paused. If the ETA is greater than 14 days, a '???' string is shown. In any other case, the ETA is shown like the following examples: 1d11h23m (For time longer than a day, the 'seconds' part is omitted) 12h45m21s (For time shorter than a day, the 'days' part is omitted) Where (obviously) 'd','h','m' and 's' stand for 'days','hours','minutes' and 'seconds'. Configuration ------------- This plugin needs a config file ('utorrent.ini') in the same folder where it resides. You can modify the example config file or... Create a text file with this content: [config] user= pwd= server= port= refresh= Fill the values of this settings: user : Username with access to WebUI pwd : Password with access to WebUI server : name (or IP) of the server where uTorrente is running. port : Access port to the WebUI refresh : Refresh interval in miliseconds (2000 <= time <=60000 ) If LCDSmartie and uTorrent are running on the same machine you can specify 'localhost' on the 'server' value. Save as 'utorrent.ini' and copy it in the same folder of the plugin. This settings are read only once (on the plugin start). Every change needs to restart the plugin. How to test the settings: Open a browser, put in the URL the values you write in the config file in this syntax: http://:@:/gui/ and push INTRO. If they are OK, you must see the WebUI of utorrent. A (part) of a configuration file for LCDSmartie is included, to show several screens with this plugin. Use --- The available functions are these: *Function 1 (TORRENT STATS) Syntax: $dll(utorrent,1,,); Where: is the order number of the torrent and starts from 0. is the field index and starts from 0. Examples: (Torrent Stats) $dll(utorrent,1,0,0) // hashvalue $dll(utorrent,1,0,1) // status $dll(utorrent,1,0,2) // torrentname $dll(utorrent,1,0,3) // size (in GBytes/MBytes/KBytes) $dll(utorrent,1,0,4) // completed % $dll(utorrent,1,0,5) // downloaded (in GBytes/MBytes/KBytes) $dll(utorrent,1,0,6) // uploaded (in GBytes/MBytes/KBytes) $dll(utorrent,1,0,7) // ratio % $dll(utorrent,1,0,8) // upload (in KBytes/s) $dll(utorrent,1,0,9) // download (in KBytes/s) $dll(utorrent,1,0,10) // eta (in days,hours,mins,sec) $dll(utorrent,1,0,11) // label $dll(utorrent,1,0,12) // connected peers $dll(utorrent,1,0,13) // peers in swarm $dll(utorrent,1,0,14) // connected seeds $dll(utorrent,1,0,15) // seeds in swarm $dll(utorrent,1,0,16) // availability (in 1/65536th) $dll(utorrent,1,0,17) // number of order $dll(utorrent,1,0,18) // remaining bytes (in GBytes/MBytes/KBytes) And the same with the second one: $dll(utorrent,1,1,0) // hashvalue $dll(utorrent,1,1,1) // status ... $dll(utorrent,1,1,7) // ratio % And the same with the third one: $dll(utorrent,1,2,0) // hashvalue $dll(utorrent,1,2,1) // status ... $dll(utorrent,1,2,7) // ratio % And so on... *Function 2 (TORRENT GLOBALS) Syntax: $dll(utorrent,2,,); Where: is the value to be retrieved. Examples: $dll(utorrent,2,0,) // Total # of torrents $dll(utorrent,2,1,) // Total # of active torrent ... $dll(utorrent,2,7,) // Total download speed *Function 3 (ABOUT info) Syntax: $dll(utorrent,3,,); History ------- 21-Mar-2008 - First Versión (v0.115). - New Version (v0.117), minor bug fixed: Torrent numbers begin from 0 now. 22-Mar-2008 - New version (v0.201), added a new function to retrieve global info. - Revised README file. 23-Mar-2008 - New version (v0.202. Filesize values are more 'naturally' formatted. 01-Apr-2008 - New version (v2.1.1) Fixed a potential bug that causes a memory leak when uTorrent/WebUI is not active and we're on LCDsmartie setup screen.