Personally I don't much like uTorrent, it was a once great little client that has become increasingly bloated and commercialized with each and every new version. My favored alternative is qBittorrent an open source client specifically designed to recall the nice clean simple client that uTorrent used to be!
So I was little disappointed that there was no rainmeter skin for qBittorrent and resolved to create one myself, which I attach.
I say myself, what I mean is myself with substantial help from jsmorley!
I have almost no lua experience and the vast majority of the code in the .lua file is his, I merely tweeked bits of it to better suit the output I wanted. His code to parse an information stream using lua, and his helpful answers to my many questions can be found here
How to use the skin
- The first thing to be done is to enable qBittorrent's WebUI, instructions for doing so can be found here:
https://github.com/lgallard/qBittorrent-Controller/wiki/How-to-enable-the-qBittorrent-Web-UI
In addition to those instructions be sure to tick "Bypass authentication for localhost"
- The skin should now work, as long a qBittorrent is running, minimsed to the taskbar is fine (which is where my client spends most of its time)
Edit:
- It has been suggested to me that the current format of an important link isn't as general purpose as it perhaps could be!
So if it doesn't work for you (displays a blank window) then it might be worth trying the following.
One line 25 of qbittorrent.ini change
Code: Select all
http://127.0.0.1:8080/query/torrents?filter=downloading&sort=eta&limit=4
Code: Select all
http://localhost:8080/query/torrents?filter=downloading&sort=eta&limit=4
In the supplied form the skin is setup to:
1) Only show downloading torrents
2) To order them by increasing ETA
3) Only display the first 4 torrents
4) To show ETA as a decimal of the largest relevant time increment. For example. 1,000,000 seconds would be displayed as "1.7 wks" whilst 10,000 seconds would be displayed as "2.8 hrs"
I should note that I am not a very experienced coder and the skin is not currently designed to cater for all possible end user requirements. It is currently tailored to MY requirements. I hope to perhaps release a more catch-all version at some point but in the meantime below are some tips about how you might tailor it differently to YOUR requirements.
Easy things to change
Changing the size, colour, position, background etc of the meters should all be pretty familiar to anyone who has some experience of rainmeter. There is nothing especially special or different about the skin everything in this regard is very standard.
Points 1) and 2) of the above list are not actually controlled by anything intrinsic to skin but rather by the format of the WebUI link the skin parses. This link is found on line 25 of qbittorrent.ini and reads
Code: Select all
http://127.0.0.1:8080/query/torrents?filter=downloading&sort=eta&limit=4
The next 3 terms specify what torrent information is retrieved
?filter=downloading - We want info on downloading torrents
&sort=eta - Order them by ETA
&limit=4 - Only return the top 4
You can tailor this link to whatever you might require, there is a guide as to the formatting to be found here:
https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#get-torrent-list
Harder things to change
The skin is currently designed to retrieve the following info from the torrent list you ask the WebUI for
- Torrent Name
- Torrent ETA
- Download Speed
- Torrent Progress
Retrieving other or additional bit of torrent info would (whilst eminently fiesible) require making some reasonably substantive changes to both the .ini and .lua and you should probably only attempt it if you have a pretty decent knowledge of .lua coding
Returning more than 4 torrents is a little more doable, only requiring changes to the .ini
The changes that would need to be made are:
- Increase the &limit=4 term in the link as described above to your desired value.
- In [MeasureScript] on line 34 increase MaxTorrents to your desired value.
- Between lines 37 and 60 you will find 4 measures named "MeasureProg#", you will need to create additional versions of these with the # incrementing up to your desired value.
- From line 96 onwards you will find 5 meters per potential torrent, you will need to create additional copies of these meters upto the max number of torrents you want displayed. You will probably also have to tweek the positioning of the new meters, I'm afraid I didn't take the time to fully optimize the X and Y positions so that everything aligns properly upon merely copy and pasting the meters, I found this tricky as the different meters use different alignments.
It is important that the naming convention for both the meter names and the Group is followed. Convention is described below
Code: Select all
Meter names
[MeterNameX]
[MeterSpeedX]
[MeterETAX]
[MeterProgBarX]
[MeterProgX]
Where X is an incrementing number from 1 to Max Torrent number
Each meter for each increment must also have the following group
Group=qbt|TorrentX
I hope people might find this useful.
This is the first skin I've published so I may have made mistakes!