It is currently May 6th, 2024, 6:47 am

Help needed for uTorrent rainmeter skin...

Get help with creating, editing & fixing problems with skins
TheAslan
Posts: 87
Joined: June 4th, 2009, 10:41 pm

Help needed for uTorrent rainmeter skin...

Post by TheAslan »

Hiya!!

I need some help right now because i'm adding uTorrent skin in my E.V.O rainmeter skin, but how do i get it to show how much is downloaded in Megabytes??

Here's the code:
[Measure1Name]
Group=AllMeasures
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureWebUI]
StringIndex=3

[Measure1Size]
Group=AllMeasures
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureWebUI]
StringIndex=4
[Measure1SizeCalc]
Group=AllMeasures
Measure=Calc
Formula=Measure1Size/1048576

[Measure1PercentDone]
Group=AllMeasures
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureWebUI]
StringIndex=5
[Measure1PercentDoneCalc]
Group=AllMeasures
Measure=Calc
Formula=Measure1PercentDone/10
MinValue=0
MaxValue=100

[Measure1DLSpeed]
Group=AllMeasures
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureWebUI]
StringIndex=10
[Measure1DLSpeedCalc]
Group=AllMeasures
Measure=Calc
Formula=Measure1DLSpeed/1024
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help needed for uTorrent rainmeter skin...

Post by jsmorley »

You will have to parse the WebUI for uTorrent, and get the amount downloaded you want in a StringIndex and put it in a meter of your choice.

Here is the info you need to parse uTorrent after you set up the WebUI and get that working:

Url=http://jsmorley:mypassword@127.0.0.1:8081/gui/?list=1
RegExp=(?siU)torrents\":.*(?(?=.*\[\").*\[\"(.*)\",(.*),\"(.*)\",(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),\"(.*)\",(.*),(.*),(.*),(.*),(.*),(.*),(.*)\])

01=> 85635A8692B6ABAE17DA3EEC36BED5B52CE1BF3C
02=> 201
03=> The Tree 2010 BRRip [H264 Masta]
04=> 1346919573
05=> 41
06=> 55368853
07=> 134168576
08=> 2423
09=> 273455
10=> 85917
11=> 24176
12=>
13=> 40
14=> 1327
15=> 6
16=> 165
17=> 851866
18=> 1
19=> 1291550720

To get the list of all torrents, request http://[IP]:[PORT]/gui/?list=1 . This will return the torrents in the following fashion:

{
"build": BUILD NUMBER (integer),
"label": [
[
LABEL (string),
TORRENTS IN LABEL (integer) ],
...
],
"torrents": [
[
01 HASH (string),
02 STATUS* (integer),
03 NAME (string),
04 SIZE (integer in bytes),
05 PERCENT PROGRESS (integer in per mils),
06 DOWNLOADED (integer in bytes),
07 UPLOADED (integer in bytes),
08 RATIO (integer in per mils),
09 UPLOAD SPEED (integer in bytes per second),
10 DOWNLOAD SPEED (integer in bytes per second),
11 ETA (integer in seconds),
12 LABEL (string),
13 PEERS CONNECTED (integer),
14 PEERS IN SWARM (integer),
15 SEEDS CONNECTED (integer),
16 SEEDS IN SWARM (integer),
17 AVAILABILITY (integer in 1/65535ths),
18 TORRENT QUEUE ORDER (integer),
19 REMAINING (integer in bytes) ],
...
],
"torrentc": CACHE ID** (string integer) }



* STATUS: The STATUS is a bitfield represented as integers, which is obtained by adding up the different values for corresponding statuses:

1 = Started
2 = Checking
4 = Start after check
8 = Checked
16 = Error
32 = Paused
64 = Queued
128 = Loaded

For example, if a torrent job has a status of 201 = 128 + 64 + 8 + 1, then it is loaded, queued, checked, and started. A bitwise AND operator should be used to determine whether the given STATUS contains a particular status.