"Run At Completion" plugin - need help
Posted: Wed Aug 06, 2008 10:08 pm
Heya,
Abstract: I want to create (or have created) a plugin that lets you have commands set to run when a torrent completes. More specifically, I would like to be able to have a script or process run against a particular file in the torrent.
Where I'm at: I've had a look at the existing plugins and I'm pretty impressed with how powerful there are. I'm caught halfway between learning the plugin system and leveraging off existing plugins. As an example of the latter, I've been looking at the output of the "event logging" plugin, and having a shell script keep an eye on that output. When the output announces a torrent completion, I have the script act on the information in the log file. It's an ugly way to do things and the results wouldn't help anyone but myself. If I could create a user friendly plugin, that would be something else entirely.
Looking into the existing plugins I can see how the plugins make good use of the deluge classes. At the moment I'm having trouble learning the extent of the deluge classes and what information is available to the plugin system.
An obvious use for this plugin would be to have e-mails sent upon completion. "At completion run e-mail script". Another would be to move upon completion. Another would be to "unrar" upon completion. Another which I've had cause to do in the past is a script to copy a completed torrent to another directory, and rehash for seeding to another tracker.
Anyway... if anyone thinks they can help, please do as I have bugger all knowledge of the plugin system and I'm working from scratch, and as I come up with stuff that might be helpful to others I'll post here.
Cheers
Abstract: I want to create (or have created) a plugin that lets you have commands set to run when a torrent completes. More specifically, I would like to be able to have a script or process run against a particular file in the torrent.
Where I'm at: I've had a look at the existing plugins and I'm pretty impressed with how powerful there are. I'm caught halfway between learning the plugin system and leveraging off existing plugins. As an example of the latter, I've been looking at the output of the "event logging" plugin, and having a shell script keep an eye on that output. When the output announces a torrent completion, I have the script act on the information in the log file. It's an ugly way to do things and the results wouldn't help anyone but myself. If I could create a user friendly plugin, that would be something else entirely.
Looking into the existing plugins I can see how the plugins make good use of the deluge classes. At the moment I'm having trouble learning the extent of the deluge classes and what information is available to the plugin system.
An obvious use for this plugin would be to have e-mails sent upon completion. "At completion run e-mail script". Another would be to move upon completion. Another would be to "unrar" upon completion. Another which I've had cause to do in the past is a script to copy a completed torrent to another directory, and rehash for seeding to another tracker.
Anyway... if anyone thinks they can help, please do as I have bugger all knowledge of the plugin system and I'm working from scratch, and as I come up with stuff that might be helpful to others I'll post here.
Cheers