Suggestion: View total remaining disk space in bottom bar

peshua19

Member
May 25, 2018
897
0
16
I run rutorrent on my own, fairly old and limited server, and I think its possibly the best use for the thing that could have been found. However, because the box is old and I tend to do a lot of downloading, the hard drive tends to fill up pretty rapidly.

Currently in rutorrent, you are required to click on a torrent, click on the General tab, and then scroll down until you can see the "Free disk space" field. I was wondering if it could be easily implemented as a plugin or a hack to add a "Free remaining disk space" field or something like "X GB used/Y GB free" to the bottom bar in rutorrent, possibly between UL/DL speed and the rtorrent/libtorrent version numbers, as a way to save time and make finding remaining space more user friendly.

I'll be looking into this, but I don't have a lot of free time and I'm not really well acquainted with PHP or how xmlrpc functions, so if any benevolent coder would help me out, I'd be extremely grateful.


TIA
[edit]
Well, I found the diskspace plugin, about 30 seconds after posting this, despite the fact that the plugin doesn't have a wiki description page, but I haven't deleted the thread because while showing use percentage is a big step forward, is there any way to get a more precise output, perhaps as a fraction of used GB over total GB?
 

peshua19

Member
May 25, 2018
897
0
16
This sort of thing would be very helpful to know when downloading the thing! Thanks rascalli, hadn't thought of trying that!

After learning this, to achieve what I wanted I opened the plugin's /init.js and exchanged the following line:
Code:
$("#meter-disk-text").text(percent+'%').attr("title", theConverter.bytes(free)+"/"+theConverter.bytes(full));with:
Code:
$("#meter-disk-text").text(theConverter.bytes(full-free)+"/"+theConverter.bytes(full)).attr("title", percent+'%');
This achieves the "used GB / total GB" in the status bar and puts the percentage as the alt text, but the used/total text doesn't fit the small disk meter, so I had to open /diskspace.css and replace the following lines:
Code:
#meter-disk-text { position: relative; text-align: left; float: left; width: 0px; height: 0px; overflow: visible; left: 40%;font-size: 11px; font-family: Tahoma, Arial, Helvetica, sans-serif; z-index: 1; }
#meter-disk-holder { width: 100px; height: 18px; line-height: 18px; border-right: 1px solid #A0A0A0; margin-left: 25px; }
with:
Code:
#meter-disk-text { position: relative; text-align: left; float: left; width: 0px; height: 0px; overflow: visible; left: 25%;font-size: 11px; font-family: Tahoma, Arial, Helvetica, sans-serif; z-index: 1; }
#meter-disk-holder { width: 150px; height: 18px; line-height: 18px; border-right: 1px solid #A0A0A0; margin-left: 25px; }This makes the container about 50px longer and moves the text slightly more to the left, which fits my HDD space, and should fit most I suspect. If it doesn't, and you want to adjust this, just change the second line where it says "width: 150px" to however long you desire, and adjust "left: 25%" on the first line to an amount that makes you happy with the alignment of the text.

Hope this helps out anyone looking to do the same thing, it's really quite easy and works perfectly.
 

saroos1

Member
May 25, 2018
718
0
16
Closely related but not the same. When I checked my disk space with a mouse roll over, it showed 8.2/9.6 which is my "/" partition. All the torrent data is stored on a much larger partition "/home/". How might I get this plugin to reflect that usage instead?
 

saroos1

Member
May 25, 2018
718
0
16
How do I find out, how my top directory is called?

edit: figured it out: its the name of the Volume