Firefox-Plugin

Suggest, post, or discuss plugins for Deluge
Post Reply
Nesta
New User
New User
Posts: 4
Joined: Sun Jun 10, 2007 6:31 pm

Firefox-Plugin

Post 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.
Ubuntu 7.10 Gutsy Gibbon
Nesta
New User
New User
Posts: 4
Joined: Sun Jun 10, 2007 6:31 pm

Re: Firefox-Plugin

Post 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
Attachments
DelugeStats-0.2.xpi.zip
rename to .xpi, then go to Firefox -> Open File
(10.66 KiB) Downloaded 373 times
StatServer.zip
(1.97 KiB) Downloaded 303 times
Ubuntu 7.10 Gutsy Gibbon
stefano_DE
New User
New User
Posts: 3
Joined: Thu Sep 20, 2007 8:37 pm

Re: Firefox-Plugin

Post 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)
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: Firefox-Plugin

Post 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.
User avatar
zachtib
Leecher
Leecher
Posts: 97
Joined: Thu May 24, 2007 3:26 pm
Location: Louisville, KY
Contact:

Re: Firefox-Plugin

Post 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
Former Deluge Developer
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: Firefox-Plugin

Post 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)
dev: webui, core, labels | irc:vonck7 |
Post Reply