Page 1 of 1

Firefox-Plugin

Posted: Wed Jul 25, 2007 4:37 pm
by Nesta
Hi,
at the moment I'm using uTorrent + wine + a firefox plugin from the user hiddenriver @ utorrent-forums that shows UL/DL-statistics in the firefox-statusbar and also allows for drag&drop of URLs.
Something like that would be really cool for Deluge.
So I went ahead and created a mockup for such an extension:

Image

My problem is, that I'm an absolutely lousy coder and can't get past loading and saving preferences in firefox, so I'm asking for help here.

What still needs to be done:

- Drag'n'Drop in Firefox (this might be taken from the utorrent-extension)
- some kind of statistics-server as plugin for deluge, that gives out statistics and adds received torrent-URLs to deluge
- make the firefox-extension connect periodically to that server

So if anyone could make this work I'd be really glad since this eases the workflow quite a bit.

Regards,
Nesta

P.S.: both the original utorrent-extension and the rudimentary DelugeStats-extension are attached. Those are only simple zip-archives which can be extracted with any Archiver.

Re: Firefox-Plugin

Posted: Thu Aug 02, 2007 6:31 pm
by Nesta
Since some people seem to be interested according to the thread views, here's a little update.

What works:
Firefox-Settings
Firefox Drag&Drop of URLs
Firefox shows several responses ("Deluge not running", "Login Failed", "Torrent added", "Invalid Link")
Firefox shows upload/download stats (as seen in the picture in the post above)
Firefox updates the stats every $interval seconds automatically
The Firefox extension can be used from several browser-instances/computers simultaneously

What doesn't work (or doesn't work good):
Deluges interface is somewhat unresponsive when the StatServer is activated
No StatServer-plugin configuration yet (this can be changed in the python-file though, standard is "username", "password", port 1600 atm)
Data is exchanged in plaintext (I'll look into encoding it with base64 or something)
There is currently no way of getting the number of torrents I'm seeding/downloading, only the total number of torrents, so Firefox shows "xx" instead atm

The unresponsiveness is caused by the update-loop, if anyone could give me a hint on how to avoid that bottleneck I'ld be glad.

For the drag&drop-functionality it's best to set a download-folder in the Deluge-preferences or else Deluge will pop up the File-Selector everytime you add a torrent.

Well, let me know what you think about the plugin.

So long,
Nesta

Re: Firefox-Plugin

Posted: Thu Sep 20, 2007 8:59 pm
by stefano_DE
Hi Nesta,
i'd like to use the plugin, but i don't know how to run the ServerStat.
Can you pass an example, so that a poor newbie in python can understand?
I unpacked the zip and from
i've tried

Code: Select all

$ python StatServer/__init.py
but the answer is:

Code: Select all

Traceback (most recent call last):
  File "__init__.py", line 31, in <module>
    plugin_name = _("StatServer")
NameError: name '_' is not defined
Sorry for the oddity, but i don't know how to invoke the program.
Thank you!
Stefano c.
(ubuntu7.04, deluge0.5.5, firefox2.0.0.6)

Re: Firefox-Plugin

Posted: Sat Sep 22, 2007 3:35 pm
by gazpachoking
stefano_DE wrote: i'd like to use the plugin, but i don't know how to run the ServerStat.
I believe ServerStat is a deluge plugin, copy the folder to your deluge plugins folder (~/.config/deluge/plugins, or /usr/share/deluge/plugins)
Then activate the plugin from the plugins tab in deluge preferences.

Re: Firefox-Plugin

Posted: Thu Oct 04, 2007 12:21 am
by zachtib
i just tried this on latest svn trunk, and it causes the entire deluge ui to freeze, wondering if you had any updated builds

Re: Firefox-Plugin

Posted: Fri Oct 05, 2007 7:11 pm
by mvoncken
Hi Nesta,

I could add some json methods to the webui if you want them.
Then you won't have to maintain a server component anymore.

I already added 2 ways to add a torrent.
1 : POST with password+file-upload :

Code: Select all

curl -F torrent=@./test1.torrent -F pwd=deluge http://localhost:8112/remote/torrent/add  
2 : add url :

Code: Select all

http://localhost:8112/torrent/add?redir_after_login=1&url=" + escape(url)