[Plugin] SeedTime - Stop seed after time (v0.5)

Suggest, post, or discuss plugins for Deluge
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

[Plugin] SeedTime - Stop seed after time (v0.5)

Post by gazpachoking »

EDIT: 0.5 released. Addressed some performance concerns.

I'm working on a plugin that will pause torrents after they have spent a certain amount of time seeding. Currently it is very basic and may have bugs, more features to come. Please report any issues here.
Current features:
- Set a global seed stop time for all new torrents
- Set seed stop time for individual torrents on gtkui right click menu
- Set custom stop times from right click menu
- View the current seed time and seed stop time as columns in the gtkui
- Option to remove torrents after time
Planned features:
- Set default stop times for different labels
- Support for setting times from FlexGet

Also... someone should send me a pull request with webui support ;)

https://github.com/gazpachoking/deluge- ... s/tag/v0.5
Last edited by gazpachoking on Fri Apr 27, 2012 12:15 am, edited 6 times in total.
EightyFour
Member
Member
Posts: 13
Joined: Tue Apr 03, 2012 11:19 am

Re: [Plugin] Stop seed after time

Post by EightyFour »

Thanks :D Just what I was looking for. Will there also come an option for auto removing torrents?
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: [Plugin] Stop seed after time

Post by gazpachoking »

EightyFour wrote:Thanks :D Just what I was looking for. Will there also come an option for auto removing torrents?
Yep, in the plan as well. Just updated top post.
EDIT: Added.
jbmia
New User
New User
Posts: 3
Joined: Mon Apr 30, 2012 7:10 pm

Re: [Plugin] Stop seed after time v0.4

Post by jbmia »

Hi guys,

I'm running Deluge server on Amahi (Fedora) with no issues. I can access the server via Web Ui or GTK thin client. I've installed a couple plugins, but cannot get this one to work. I'm currently running Python 2.7... I'm not a a programmer for what it's worth, but no my way around Linux. I tried both the 2.6 egg and the 2.7 egg. I had to built the 2.7 egg using this command 'python setup.py bdist_egg'.. Hope this is correct... I've tried the "install plugi-in" from a local GTK thin client (server, 127.0.0.1), a remote thin client (inside network), and the web client. I've also tried putting the 2.7 egg in the ~/.config/deluge/plugins folder.. I've also tried the rescan plugins option in preferences... At first I couldn't even get the plugin to appear, but checking the logs it seems to have been a permissions issue... (Just changed ownership of the .egg to deluge:deluge) Now, the Seedtime plugin appears, but when I select it, it appears to crash as the tick box immediately unselects itself. Logs indicate the following:

Code: Select all

[ERROR   ] 15:42:03 rpcserver:303 Exception calling RPC request: bad local file header in /var/lib/deluge/.config/deluge/plugins/SeedTim$
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/deluge/core/rpcserver.py", line 298, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/deluge/core/core.py", line 506, in enable_plugin
    self.pluginmanager.enable_plugin(plugin)
  File "/usr/lib/python2.7/site-packages/deluge/core/pluginmanager.py", line 82, in enable_plugin
    super(PluginManager, self).enable_plugin(name)
  File "/usr/lib/python2.7/site-packages/deluge/pluginmanagerbase.py", line 139, in enable_plugin
    egg.activate()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2227, in activate
    self.insert_on(path)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2334, in insert_on
    self.check_version_conflict()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2373, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2221, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1209, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1201, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1266, in _get
    return self.loader.get_data(path)
ZipImportError: bad local file header in /var/lib/deluge/.config/deluge/plugins/SeedTime-0.4-py2.7.egg


Did I build the 2.7 egg wrong? Can anyone point me in the right direction?

edit: By the way, this file "SeedTime-0.4-py2.7.egg", here: https://github.com/gazpachoking/deluge- ... /downloads appears to be empty... Else, I wouldn't have hassled with trying to figure out how to build the egg from the zipped files...
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: [Plugin] Stop seed after time v0.4

Post by gazpachoking »

Hmm, not exactly sure what's going on. I did fix the 2.7 download though, not sure what the problem was the first time. Try the egg there to make sure it isn't a problem with your build.
jbmia
New User
New User
Posts: 3
Joined: Mon Apr 30, 2012 7:10 pm

Re: [Plugin] Stop seed after time v0.4

Post by jbmia »

I deleted the one I built and downloaded and installed your updated 2.7 egg. Now I can tag the plugin box without it blowing up, but it's not populating anything in the left hand categories column that I can use to configure settings... Should I be seeing a "seedtime" value pop up in the categories column? Where is the config performed? Thanks!!
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: [Plugin] Stop seed after time v0.4

Post by gazpachoking »

jbmia wrote:I deleted the one I built and downloaded and installed your updated 2.7 egg. Now I can tag the plugin box without it blowing up, but it's not populating anything in the left hand categories column that I can use to configure settings... Should I be seeing a "seedtime" value pop up in the categories column? Where is the config performed? Thanks!!
You can configure a default seed time for newly added torrents from the seed time preferences dialog. You can show or hide two new columns in the gtkui, 'seed time' (the time seeded so far) and 'stop seed time' (the seed time it is set to stop at). You can also set the seed time for individual torrents by right clicking on them from the gtkui and selecting the time from the seed time menu.
jbmia
New User
New User
Posts: 3
Joined: Mon Apr 30, 2012 7:10 pm

Re: [Plugin] Stop seed after time v0.4

Post by jbmia »

I got this to work in the Linux client GTK UI, but am still unable to get it to work in the Windows UI. Not a major issue, but thought I'd mention it... Has this been tested in Windows? Has this been tested on that platform?

Also, a feature request... it would be nice to have a seed time dialog in the "options" tab for each torrent.. this tab displays the "stop seed at ratio.." as well the "movedone" path for reference... this tab is also available during the "add torrent" function where it would most useful to perform any overrides from the default as new torrents are added.

Thanks again for your effort and your assistance.

jbmia
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: [Plugin] Stop seed after time v0.4

Post by gazpachoking »

jbmia wrote:I got this to work in the Linux client GTK UI, but am still unable to get it to work in the Windows UI. Not a major issue, but thought I'd mention it... Has this been tested in Windows? Has this been tested on that platform?

Also, a feature request... it would be nice to have a seed time dialog in the "options" tab for each torrent.. this tab displays the "stop seed at ratio.." as well the "movedone" path for reference... this tab is also available during the "add torrent" function where it would most useful to perform any overrides from the default as new torrents are added.

Thanks again for your effort and your assistance.

jbmia
Actually I developed it on a Windows machine and haven't even tested on linux myself. :P I agree that it would be nice for it to be settable from the options tab, unfortunately plugins cannot modify this tab, so my only option was to have the right click menu interface. One note, you'll have to add the plugin to every client you want to be able to set the seed time from, not sure if that's your issue.
z0ny

Re: [Plugin] Stop seed after time v0.4

Post by z0ny »

Hi,
im using deluge with webui, i want to try your plugin, horewer it says "[WARNING ] 03:22:18 config:372 Unable to load config file: /my/home/path/.config/deluge/seedtime.conf" and i have absolutely no idea what properties should be inside :) Can u provide some sample confing for me with descriptions?

im using version 1.3.3, webui allows me only enable or disable your plugin so i must set it manualy in config

z0ny
Post Reply