[Plugin] Disk space

Suggest, post, or discuss plugins for Deluge
Post Reply
mrbrdo
Member
Member
Posts: 37
Joined: Mon Jun 02, 2008 6:18 am

[Plugin] Disk space

Post 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 6424 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! :)
Attachments
diskSpace-0.1-py2.5.rar
(11.05 KiB) Downloaded 305 times
Last edited by mrbrdo on Mon Sep 22, 2008 2:57 am, edited 1 time in total.
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: [Plugin] Disk space

Post 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.
dev: webui, core, labels | irc:vonck7 |
damoxc
Top Bloke
Top Bloke
Posts: 117
Joined: Sat Jul 19, 2008 7:26 pm
Location: Hampshire, UK
Contact:

Re: [Plugin] Disk space

Post by damoxc »

There's also a function in deluge.common now in case you are not aware.
mrbrdo
Member
Member
Posts: 37
Joined: Mon Jun 02, 2008 6:18 am

Re: [Plugin] Disk space

Post by mrbrdo »

oh well, what's done is done :)
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: [Plugin] Disk space

Post 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 ;).
dev: webui, core, labels | irc:vonck7 |
mrbrdo
Member
Member
Posts: 37
Joined: Mon Jun 02, 2008 6:18 am

Re: [Plugin] Disk space

Post 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
Post Reply