Page 1 of 1

[Plugin] Disk space

Posted: Sat Sep 20, 2008 11:39 am
by mrbrdo
A plugin that shows the remaining free disk space on the partition where your default download folder is. Only for linux.
TESTED: - SVN - RC9

Most code was written by mvoncken, i just modified it a bit.
Screenshot:
Screenshot
Screenshot
deluge-disk.jpg (30.67 KiB) Viewed 7302 times
Instructions:
Ok, because i wanted the thing to show me disk space on the index page, and because that is not yet possible until status-bar api is added, i'm using a little hack, so here's what you need to do (it's not complicated):

1. Copy the egg file in your plugins directory, of course
2. navigate to "deluge/ui/webui/templates/classic/" (if you're using some other skin, then change that one)
3. open the file "index.html"
4. at the very end of the file you will see (may be different for other skins):

Code: Select all

$:part_stats()
$:render.footer()
5. change it to look like this (only 1 line is added before the 2 lines):

Code: Select all

<script type="text/javascript" src="/diskspace"></script>
$:part_stats()
$:render.footer()
That's all! Hope it works for you, else post! :)

Re: [Plugin] Disk space

Posted: Sun Sep 21, 2008 5:51 am
by mvoncken
This plugin is a good proof of concept.

It's not advised to hack index.html if you're not a programmer,

1.1 will get an api for adding items to the status bar (http://dev.deluge-torrent.org/ticket/487) , so the index.html hack will not be needed anymore.
and the stats will display automatically in gtkui,webui and ajax-ui.

Hint for getting diskspace on windows: http://mail.python.org/pipermail/python ... 65911.html.

Re: [Plugin] Disk space

Posted: Mon Sep 22, 2008 10:50 am
by damoxc
There's also a function in deluge.common now in case you are not aware.

Re: [Plugin] Disk space

Posted: Tue Sep 23, 2008 7:17 am
by mrbrdo
oh well, what's done is done :)

Re: [Plugin] Disk space

Posted: Tue Sep 23, 2008 5:40 pm
by mvoncken
We're adding disk-space notification as a default feature for 1.1.
Don't think of this plugin as wasted work, see it as a way to push us into a direction ;).

Re: [Plugin] Disk space

Posted: Wed Sep 24, 2008 2:09 pm
by mrbrdo
mvoncken: that's great news :) good luck!
btw: can you make that data/pixmaps/xxx.png linking from egg in the web ui possible in 1.1 aswell? would be nice to have that :) ty