Hi,
Running latest deluge on Windows!
I want to use execute plugin to do the following:
On completion of a torrent, WAIT 180 seconds, then move to "C:\" directory. So move to C:\ after waiting 180 seconds upon torrent completion
The wait 180 seconds part is very important, but will be complicated and long-winded to explain here
Can you please help me write this script?
Move to different folder? (execute script)
Re: Move to different folder? (execute script)
Unless you want the same file to be downloaded over and over, or you don't want to seed, this cannot be done.
The daemon blocks on execute plugin scripts, so any execute script attempting to interact with the daemon as a client will stall the daemon, thus the above caveats. This also means that every time a torrent finishes, the daemon would block for 180 seconds.
Alternatively, the execute script could execute a client script as a background task, which would do all of the work.
The daemon blocks on execute plugin scripts, so any execute script attempting to interact with the daemon as a client will stall the daemon, thus the above caveats. This also means that every time a torrent finishes, the daemon would block for 180 seconds.
Alternatively, the execute script could execute a client script as a background task, which would do all of the work.
Re: Move to different folder? (execute script)
I don't know about Windows, but the equivalent on Linux would be something like:
This is using the Execute plugin upon torrent completion, obviously.
Code: Select all
torrentid=$1
torrentname=$2
torrentpath=$3
sleep 180
mv "$torrentpath/$torrentname" /
Re: Move to different folder? (execute script)
I believe the blocking behavior of scripts will be changed in 1.3.4, but if you don't want deluge to hang duing your sleep statement you need to lauch your script from all calling script.
In linux you would put an & at the end of the line.
In windows put your actual code in a second script file and then call it like this
call otherCommand.bat
this should cause it to run separately.
In linux you would put an & at the end of the line.
In windows put your actual code in a second script file and then call it like this
call otherCommand.bat
this should cause it to run separately.
Re: Move to different folder? (execute script)
1.3.4 has been released and yes it doesn't wait on scripts to finish anymore (so it won't hang).
As a side note you shouldn't use mv as deluge will no longer be able to seed that torrent.
I believe you want to either use deluge's "move completed to" feature or just copy the file to another location.
As a side note you shouldn't use mv as deluge will no longer be able to seed that torrent.
I believe you want to either use deluge's "move completed to" feature or just copy the file to another location.