Page 1 of 1

Autostart Deluge if not finished downloading

Posted: Thu Jan 06, 2011 11:22 am
by mr_kazoodle
(old text has been removed)

EDIT:
I made 2 scripts which make sure that Deluge is started automatically if there are incomplete downloads.
Because I don't want Deluge to be running when I don't need it and I always forget to start Deluge after starting my computer if I'm downloading a file. You can find them in my lastest post.

The ideal situation would be to create a plug-in for this OR being able to rely on the Execute plug-in (which is NOT the case)

Execute plugin is unreliable!

Posted: Thu Jan 06, 2011 2:59 pm
by mr_kazoodle
(text removed when edited)

The Execute plug-in executes the script when I start Deluge instead of executing it only when adding a torrent. It increases the number of incomplete torrents by every torrent listed in Deluge and messes up my record. This forced me to find a workaround.

(text + attachment removed when edited)

Re: Autostart Deluge if not finished downloading

Posted: Thu Jan 06, 2011 4:58 pm
by mr_kazoodle
EDIT
Old workaround, I won't remove the attachment in case someone would find it interesting.

Re: Autostart Deluge if not finished downloading

Posted: Fri Jan 07, 2011 2:50 pm
by mr_kazoodle
NEW scripts: I cut the number of scripts needed down to 2
(I wanted the startup script to be as short as possible, so I still use 2 scripts)

Deluge_script.py:
  • No parameters: increase the number of incomplete torrents by 1
  • "-d" or "--decrease": decrease the number of incomplete torrents by 1
  • "-s" or "--start": starts deluge and corrects for the Execute bug (=executing scripts after starting deluge)
Startupscript.py:
  • Checks if there are incomplete downloads and if so starts deluge.
Notes:
I included a README.txt file
:!: One could achieve an even better result with simpler scripts IF the Execute plugin was to be improved.
:!: There is however an issue which remains unsolved: if you remove a torrent which hasn't completed you need to correct .Deluge_data.txt manually or run the script with the decrease parameter. (also: if an incomplete download has been paused = minor issue)