[Plugin] Pieces Plugin

Suggest, post, or discuss plugins for Deluge
nick
New User
New User
Posts: 9
Joined: Sat Jan 09, 2010 4:06 am

[Plugin] Pieces Plugin

Postby nick » Sat Jan 09, 2010 4:10 am

I've written a plugin to show the status of each piece of a torrent. You can find it here: http://dev.deluge-torrent.org/wiki/Plugins/Pieces

This works in both client/server and Classic mode. Webui is also supported, although you cannot see or set individual piece priorities.

(Jan 18 2011) Version 0.5 Released
  • Support client/server mode (i.e. not "Classic" mode)
  • Webui support (only displays piece status, no priority info/setting)
  • Some minor bug fixes


    Questions/Comments welcome. Hope you enjoy!

    Main Tab:
    pss.png
    Main Pieces Tab
    pss.png (69.42 KiB) Viewed 15913 times


    Prefs Window:
    pprefs.png
    Prefs Window
    pprefs.png (35.95 KiB) Viewed 15912 times


    Tooltip:
    tooltip.png
    Tooltip Screenshot
    tooltip.png (4.59 KiB) Viewed 15723 times



    --- Old News---
    (Jan 5 2011) Version 0.4 Released
    • Fix a nasty segfault bug from 0.3
    • Easy select of multiple pieces using Shift/Ctrl
    • Big speed improvement for torrents with lots of pieces
    • Ability to always set first un-downloaded piece priority to high to enable watching of movies before they are completely downloaded.

(1/15/2010) Version 0.2 Released:
- Finished/Seeding torrents now display correctly
- Tooltip to show which piece you are hovering over
- Ability to set priorities for individual pieces (via right click menu)
Last edited by nick on Tue Jan 18, 2011 2:50 pm, edited 3 times in total.

loki
Compulsive Poster
Compulsive Poster
Posts: 787
Joined: Tue Dec 04, 2007 3:27 pm
Location: MI, USA
Contact:

Re: Pieces Plugin for 1.2 (gtkui)

Postby loki » Sun Jan 10, 2010 2:12 am

I like it, it works, I'm not sure about your specific colors but if it works for you...
One thing though, once a file finishes downloading the pieces disappear, not that it's particularly needed anymore but is this expected behavior?

nick
New User
New User
Posts: 9
Joined: Sat Jan 09, 2010 4:06 am

Re: Pieces Plugin for 1.2 (gtkui)

Postby nick » Sun Jan 10, 2010 9:24 pm

Thanks, but leave my color choices alone :)

The reason the pieces disappear is that libtorrent returns an empty list of pieces for torrents that are seeding and/or completed. What I'll probably do is check when the list is empty if the torrent is complete and just draw all the pieces as downloaded, but for now it sees the empty list and just doesn't draw anything.

yunihiko

Re: Pieces Plugin for 1.2 (gtkui)

Postby yunihiko » Mon Jan 11, 2010 7:28 pm

I'm trying to use this plugin, but when clicking on the Pieces tab get these errors in the console

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/torrentdetails.py", line 383, in _on_switch_page
    self.update(page_num)
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/torrentdetails.py", line 367, in update
    self.tabs[name].update()
  File "/home/as/.config/deluge/plugins/Pieces-0.1-py2.6.egg/pieces/gtkui.py", line 191, in update
  File "/usr/lib/pymodules/python2.6/deluge/component.py", line 245, in get
    return _ComponentRegistry.get(component)
  File "/usr/lib/pymodules/python2.6/deluge/component.py", line 113, in get
    return self.components[name]
KeyError: 'TorrentManager'

and nothing else. What up? Deluge 1.2.0, python-libtorrent 0.14.6-1 from ubuntu repos.

nick
New User
New User
Posts: 9
Joined: Sat Jan 09, 2010 4:06 am

Re: Pieces Plugin for 1.2 (gtkui)

Postby nick » Fri Jan 15, 2010 11:11 pm

yunihiko wrote:I'm trying to use this plugin, but when clicking on the Pieces tab get these errors in the console

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/torrentdetails.py", line 383, in _on_switch_page
    self.update(page_num)
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/torrentdetails.py", line 367, in update
    self.tabs[name].update()
  File "/home/as/.config/deluge/plugins/Pieces-0.1-py2.6.egg/pieces/gtkui.py", line 191, in update
  File "/usr/lib/pymodules/python2.6/deluge/component.py", line 245, in get
    return _ComponentRegistry.get(component)
  File "/usr/lib/pymodules/python2.6/deluge/component.py", line 113, in get
    return self.components[name]
KeyError: 'TorrentManager'

and nothing else. What up? Deluge 1.2.0, python-libtorrent 0.14.6-1 from ubuntu repos.


This is odd. It means the core isn't able to find the TorrentManager component which is a central part of the system. I haven't been able to reproduce this, but I'm working on it and will update when I figure it out.

yunihiko

Re: Pieces Plugin for 1.2 (gtkui)

Postby yunihiko » Tue Jan 19, 2010 7:33 pm

nick wrote:I haven't been able to reproduce this


The plugin works in the classic mode, but does not work when using deluge in the daemon mode with a separate gtk-ui.

ariafan
New User
New User
Posts: 9
Joined: Thu Jan 07, 2010 1:11 pm
Location: Russia
Contact:

Re: Pieces Plugin for 1.2 (gtkui)

Postby ariafan » Wed Jan 20, 2010 5:51 am

I want to make a russian translation of your plugin. How?

nick
New User
New User
Posts: 9
Joined: Sat Jan 09, 2010 4:06 am

Re: Pieces Plugin for 1.2 (gtkui)

Postby nick » Wed Jan 20, 2010 7:54 pm

yunihiko wrote:
nick wrote:I haven't been able to reproduce this


The plugin works in the classic mode, but does not work when using deluge in the daemon mode with a separate gtk-ui.



Ahh ha, that makes a lot of sense. I'll investigate getting that fixed when I have some time. Thanks for the report!

nick
New User
New User
Posts: 9
Joined: Sat Jan 09, 2010 4:06 am

Re: Pieces Plugin for 1.2 (gtkui)

Postby nick » Wed Jan 20, 2010 8:58 pm

ariafan wrote:I want to make a russian translation of your plugin. How?


Well, right now you could get the source from github and just translate all the strings and make a new .egg, but that's a pretty gross way to do it. What I should do is take strings directly out of the code and use .po files, which I'll look at getting done.

User avatar
elcamilo
Member
Member
Posts: 32
Joined: Mon Apr 27, 2009 9:54 am
Contact:

Re: Pieces Plugin for 1.2 (gtkui)

Postby elcamilo » Wed Jan 27, 2010 6:38 pm

very nice plugin, nick!

regards.


Return to “Plugins”

Who is online

Users browsing this forum: No registered users and 4 guests