[Plugin] AutoAdd (multiple watchdir) plugin for deluge 1.2+

Suggest, post, or discuss plugins for Deluge
gazpachoking
Super Seeder
Super Seeder
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
OS or Distro: WHS
Location: Pittsburgh, USA
Contact:

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby gazpachoking » Sun Feb 28, 2010 10:31 pm

wallacetheweasel wrote:They are different machines, and the plugin is installed on both (apparently that's the default behaviour when installing a plugin from a remote client).

Aside: is there an interface for configuring the plugin from the console client? Because that might avoid the problem I'm experiencing if it has to do with the remote setup... although I know, it doesn't figure out what's causing the issue or identify a bug if one exists. I would even be cool with managing the conf file by hand, if I could troubleshoot why the plugin isn't running and get it running.

Can you try running the daemon and gtk client with debug logging turned on? Then try enabling the plugin and check out what the logs say. (or post them for me to look at)

wallacetheweasel
New User
New User
Posts: 8
Joined: Sat Dec 22, 2007 4:44 pm

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby wallacetheweasel » Mon Mar 01, 2010 12:30 am

I will, but I'm writing papers and midterms this week, so I'm going to take a pause and start cracking at this again next weekend.

I really appreciate the support you're providing by the way - I realize it's largely a personal project, and that to some extent you're going out of your way to provide the support, so thanks for that!

wallacetheweasel
New User
New User
Posts: 8
Joined: Sat Dec 22, 2007 4:44 pm

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby wallacetheweasel » Sun Mar 07, 2010 10:12 pm

Alright, I've figured out what was wrong and fixed it - and the suggestion to look at the log of the GTK client was the right idea. I'll describe the issue for posterity, and in case anyone runs into the same thing, it might save them some time.

The problem was that my server and client PCs are running different distributions (Debian Lenny on the server, Ubuntu 9.10 on the client), which had different versions of python installed (2.5 and 2.6 respectively). I had installed the py2.5 egg, but naturally it wasn't playing nice with my gtk client running python 2.6. The (annotated) output of the gtk client's log was:

Code: Select all

----------> clicked on the (presently ticked) AutoAdd plugin

[DEBUG   ] 15:23:28 preferences:899 on_plugin_selection_changed
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/preferences.py", line 904, in on_plugin_selection_changed
    plugin_info = component.get("PluginManager").get_plugin_info(name)
  File "/usr/lib/pymodules/python2.6/deluge/pluginmanagerbase.py", line 169, in get_plugin_info
    for line in self.pkg_env[name][0].get_metadata("PKG-INFO").splitlines():
IndexError: list index out of range

-----------> unticked it

[DEBUG   ] 15:24:32 preferences:887 on_plugin_toggled
[WARNING ] 15:24:32 pluginmanagerbase:160 Plugin AutoAdd is not enabled..
[INFO    ] 15:24:32 pluginmanagerbase:162 Plugin AutoAdd disabled..
[WARNING ] 15:24:32 pluginmanagerbase:160 Plugin AutoAdd is not enabled..
[INFO    ] 15:24:32 pluginmanagerbase:162 Plugin AutoAdd disabled..

----------> ticked it

[DEBUG   ] 15:24:39 preferences:887 on_plugin_toggled
[WARNING ] 15:24:39 pluginmanagerbase:122 Cannot enable non-existant plugin AutoAdd


The solution was as simple as installing python2.5 on the client and running "/usr/bin/python2.5 /usr/bin/deluge-gtk" - then everything worked nicely. Of course, I could have alternately installed python2.6 on the server and run Deluge using python 2.6 (I chose not to only because I try to keep as few unstable packages as possible in my debian stable install).

Thanks again for your support and your work on the plugin gazpachoking - it was much appreciated, and I'm really happy AutoAdd is working now.

gazpachoking
Super Seeder
Super Seeder
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
OS or Distro: WHS
Location: Pittsburgh, USA
Contact:

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby gazpachoking » Mon Mar 08, 2010 2:58 am

wallacetheweasel wrote:Alright, I've figured out what was wrong and fixed it - and the suggestion to look at the log of the GTK client was the right idea. I'll describe the issue for posterity, and in case anyone runs into the same thing, it might save them some time.

The problem was that my server and client PCs are running different distributions (Debian Lenny on the server, Ubuntu 9.10 on the client), which had different versions of python installed (2.5 and 2.6 respectively). I had installed the py2.5 egg, but naturally it wasn't playing nice with my gtk client running python 2.6. The (annotated) output of the gtk client's log was:

Code: Select all

----------> clicked on the (presently ticked) AutoAdd plugin

[DEBUG   ] 15:23:28 preferences:899 on_plugin_selection_changed
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/preferences.py", line 904, in on_plugin_selection_changed
    plugin_info = component.get("PluginManager").get_plugin_info(name)
  File "/usr/lib/pymodules/python2.6/deluge/pluginmanagerbase.py", line 169, in get_plugin_info
    for line in self.pkg_env[name][0].get_metadata("PKG-INFO").splitlines():
IndexError: list index out of range

-----------> unticked it

[DEBUG   ] 15:24:32 preferences:887 on_plugin_toggled
[WARNING ] 15:24:32 pluginmanagerbase:160 Plugin AutoAdd is not enabled..
[INFO    ] 15:24:32 pluginmanagerbase:162 Plugin AutoAdd disabled..
[WARNING ] 15:24:32 pluginmanagerbase:160 Plugin AutoAdd is not enabled..
[INFO    ] 15:24:32 pluginmanagerbase:162 Plugin AutoAdd disabled..

----------> ticked it

[DEBUG   ] 15:24:39 preferences:887 on_plugin_toggled
[WARNING ] 15:24:39 pluginmanagerbase:122 Cannot enable non-existant plugin AutoAdd


The solution was as simple as installing python2.5 on the client and running "/usr/bin/python2.5 /usr/bin/deluge-gtk" - then everything worked nicely. Of course, I could have alternately installed python2.6 on the server and run Deluge using python 2.6 (I chose not to only because I try to keep as few unstable packages as possible in my debian stable install).

Thanks again for your support and your work on the plugin gazpachoking - it was much appreciated, and I'm really happy AutoAdd is working now.

Glad you got it working, thanks for updating with the solution. Just thought I'd mention, I'm pretty sure your client and server python versions don't have to match, as long as you install the appropriate version of the AutoAdd egg on each.

h8uthemost
New User
New User
Posts: 8
Joined: Thu Sep 11, 2008 7:07 am

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby h8uthemost » Wed Mar 17, 2010 5:46 am

Is there anyway to give an option to this plugin to not automatically add the torrent to the client? What I mean is, is when the client picks up the torrent from the watch folder, I want the a dialog box to pop up that will let me add the torrent to whatever folder I want(the same dialog box that you get when you open a torrent the regular way through the browser).

For example, for some music trackers, I have multiple genre's in one single folder(blues, jazz, rock, etc). So when the client picks up the torrent from the watch folder, I would like the dialog box to pop and let me add that torrent to whatever folder I want.

I hope I explained that well enough. Thanks.

EDIT: I just found out I can do what I'm wanting with the Categorize plugin(I can add the torrent in a paused state through AutoAdd, then right click the torrent and hit Move Storage, and put the torrent in the folder I want, then start it up), but it would be nice if this option could be added to AutoAdd. That way I can move the torrent into the folder that I want before I even add it to the client.

gazpachoking
Super Seeder
Super Seeder
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
OS or Distro: WHS
Location: Pittsburgh, USA
Contact:

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby gazpachoking » Wed Mar 17, 2010 2:27 pm

h8uthemost wrote:Is there anyway to give an option to this plugin to not automatically add the torrent to the client? What I mean is, is when the client picks up the torrent from the watch folder, I want the a dialog box to pop up that will let me add the torrent to whatever folder I want(the same dialog box that you get when you open a torrent the regular way through the browser).

For example, for some music trackers, I have multiple genre's in one single folder(blues, jazz, rock, etc). So when the client picks up the torrent from the watch folder, I would like the dialog box to pop and let me add that torrent to whatever folder I want.

I hope I explained that well enough. Thanks.

EDIT: I just found out I can do what I'm wanting with the Categorize plugin(I can add the torrent in a paused state through AutoAdd, then right click the torrent and hit Move Storage, and put the torrent in the folder I want, then start it up), but it would be nice if this option could be added to AutoAdd. That way I can move the torrent into the folder that I want before I even add it to the client.

Yeah, this is not possible with the AutoAdd plugin right now. It seems you might be better off just loading the torrents normally rather than using AutoAdd, as I am not sure what advantages it provides in your situation. Also, in your example it doesn't seem like you are even using the Categorize plugin, 'move storage' is a built in option to deluge. I think the easiest solution to your problem is to make a label for each download directory with the move completed folder set, and just change it to the appropriate label after you add the torrent.

devians
New User
New User
Posts: 3
Joined: Sat Aug 08, 2009 2:35 pm

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby devians » Sun Apr 04, 2010 9:23 am

Heya, i have autoadd running on deluge 1.2.2 (ubuntu ppa install) as a daemon, using the init script. I've installed autoadd for python 2.6. My watch directory is an smb share thats mounted on boot (this system is a vm and its mounting a share on the parent machine.) The permissions are fine, the ubuntu machine has 7 to all the directories it needs.

I seem to be getting a problem with autoadd however, where it will only add 1 torrent in the watch directory. if i restart the daemon it will add another. Any idea's whats going wrong there?

Also, if i put files for seeding in the appropriate complete directory, it wont check for their existence before trying to download them again, rather than spotting them and starting seeding.

gazpachoking
Super Seeder
Super Seeder
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
OS or Distro: WHS
Location: Pittsburgh, USA
Contact:

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby gazpachoking » Sun Apr 04, 2010 10:43 pm

devians wrote:I seem to be getting a problem with autoadd however, where it will only add 1 torrent in the watch directory. if i restart the daemon it will add another. Any idea's whats going wrong there?

Hmm, can you get some debug logs from deluged when this is happening? I'm not sure why this would be at the moment.
devians wrote:Also, if i put files for seeding in the appropriate complete directory, it wont check for their existence before trying to download them again, rather than spotting them and starting seeding.

Yes, deluge doesn't check in the move complete path for the files, it checks the download path. So I suppose you would have to put your content there. I'm not sure if move completed would activate right after it got checked or not, try it out.

devians
New User
New User
Posts: 3
Joined: Sat Aug 08, 2009 2:35 pm

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby devians » Tue Apr 06, 2010 8:49 am

I have my logging set to warning at the moment. (btdub, if anyone can tell me how to set deluged to append to a logfile rather than overwrite, and to write dates as well as times, im all ears)

Code: Select all

[ERROR   ] 14:24:00 core:238 glob: /home/joshua/Media/_New/torrents/watch/default loc: /home/joshua/Media/_New/torrents/watch/public general
[WARNING ] 14:24:00 config:405 Unable to open config file: /home/joshua/.config/deluge/autoadd.conf
[ERROR   ] 14:24:00 core:238 glob: /home/joshua/Media/_New/torrents/watch/default loc: /home/joshua/Media/_New/torrents/watch/private tracker
[WARNING ] 14:24:00 config:405 Unable to open config file: /home/joshua/.config/deluge/autoadd.conf
[ERROR   ] 14:24:00 core:238 glob: /home/joshua/Media/_New/torrents/watch/default loc: /home/joshua/Media/_New/torrents/watch/public tv
[WARNING ] 14:24:00 config:405 Unable to open config file: /home/joshua/.config/deluge/autoadd.conf


I fiddled with the whole complete path for files, it doesnt seem to move on the end of checking, which is annoying. the 'workaround' was putting them in complete and adding manually, which is a poor solution because it puts the torrents under general rules. maybe a ticket for andar?

maxx.h
New User
New User
Posts: 5
Joined: Fri Apr 16, 2010 3:08 pm

Re: AutoAdd (multiple watchdir) plugin for deluge 1.2

Postby maxx.h » Fri Apr 16, 2010 3:14 pm

good job on the plugin

what i am missing though is an 'queuetotop' option for important watch folders


Return to “Plugins”

Who is online

Users browsing this forum: No registered users and 9 guests