Having the ability to launch scripts upon completion of torrents would be nice.
Basically what I want to have deluge be able to do is to have it automatically copy the torrents to another computer upon completion and then finish seeding to a certain ratio before deleting the file and removing the torrent. Problems with doing this using move torrent arise because I don't think that move torrent can move over networks, move torrent moves rather than copies, and the other computer isn't always on. So I basically need a script that launches when the torrent is complete, and then another one that launches after the torrent reaches a decent share ratio.
Execute Shell Script On Completion Plugin?
-
- Member
- Posts: 13
- Joined: Mon Jan 14, 2008 7:10 pm
Re: Execute Shell Script On Completion Plugin?
If this helps anyone else, I've 'cheated' to get this functionality.
I've installed incrond on my linux box and basically set up 'watches' on my 'in progress' directory and my 'finished' directory, which sends e-mails when that occur. Naturally any script I write could do anything at that point.
I haven't figured out a way to get details like labels, seed info, or what not. Is there a way to pull this information out from deluge, via the command line? Might be nice to do once a script has finished.
I've installed incrond on my linux box and basically set up 'watches' on my 'in progress' directory and my 'finished' directory, which sends e-mails when that occur. Naturally any script I write could do anything at that point.
I haven't figured out a way to get details like labels, seed info, or what not. Is there a way to pull this information out from deluge, via the command line? Might be nice to do once a script has finished.
Re: Execute Shell Script On Completion Plugin?
What arguments would be useful to pass to the command, currently I have it passing torrent_id, torrent_name, torrent_path. I'm not sure what people will find the most useful. I guess in a later version could make the arguments that get passed configurable, but I'd like to keep it simple for the time being.
-
- Member
- Posts: 13
- Joined: Mon Jan 14, 2008 7:10 pm
Re: Execute Shell Script On Completion Plugin?
damoxc, you're my hero.damoxc wrote:What arguments would be useful to pass to the command, currently I have it passing torrent_id, torrent_name, torrent_path. I'm not sure what people will find the most useful. I guess in a later version could make the arguments that get passed configurable, but I'd like to keep it simple for the time being.
I'd hate to balloon the syntax of that script more than I have to, but for my usage the only thing I really would want above and beyond that is the 'labels' applied to the torrents. I plan on using labels as a way to differentiate where files get moved to once they're completed.
That said, those arguments might be useful enough if there's a way to query an active deluge daemon for the rest of the properties. Is there any way to do something like (pseudo-commandline): "deluge --torrent-id [x] --get-label", or some such? I think it would be cleaner to make your script as simple as possible and then support some sort of query mechanism, but I don't know how the architects of deluge feel about this.
Anyhow, to summarize: biggest thing for me is getting the 'label' associated with a torrent. I could see cases for other things (current seed ratio, etc, etc), but that'd probably be feature creep that might be better served by my second recommendation.
Re: Execute Shell Script On Completion Plugin?
http://dev.deluge-torrent.org/wiki/Deve ... iClient1.2
You can write a simple client without too much difficulty, which is where the torrent id would come in use. I think configurable arguments will probably be the solution here, and shouldn't be too difficult to implement. I'll take a peek when I have a spare moment.
You can write a simple client without too much difficulty, which is where the torrent id would come in use. I think configurable arguments will probably be the solution here, and shouldn't be too difficult to implement. I'll take a peek when I have a spare moment.
Re: Execute Shell Script On Completion Plugin?
hello ppl
i used torrentnotification plugin, added a line, that runs a script. works for me.
i used torrentnotification plugin, added a line, that runs a script. works for me.
Re: Execute Shell Script On Completion Plugin?
Hirokkk wrote:hello ppl
i used torrentnotification plugin, added a line, that runs a script. works for me.
are you running the last version of deluge ?
did you use the move on complete feature ?
can you share your modification ?
Re: Execute Shell Script On Completion Plugin?
Hello,
I find a simple solution. You can run deluged with log level debug, and then use grep to monitor the output. When a task completes, there should be some message looks like. Then you can get more information using
I find a simple solution. You can run deluged with log level debug, and then use grep to monitor the output. When a task completes, there should be some message looks like
Code: Select all
[DEBUG ] 12:44:39 alertmanager:107 state_changed_alert: abc.tar.gz : state changed to: finished
Code: Select all
deluge -u console -a "info"