tympanix / Electorrent

A remote control client for µTorrent, qBittorrent, rTorrent, Transmission, Synology & Deluge
GNU General Public License v3.0
1.03k stars 84 forks source link

[FEATURE] Task Hooks #268

Closed BitterSweetcandyshop closed 2 years ago

BitterSweetcandyshop commented 2 years ago

Client:

Client Version: Latest Operating System: Winiux UwU (Arch) Application Version: Lared

Task Hooks

I noticed that we're able to get notifications, and thus I figured you have a method to trigger an event based on the completion of a torrent, what would be awesome would be the ability to write custom scripts to preform actions.

Events: Started, Finished, Failed... and more but I think a more basic implementation would be good for early start

Format

Just off the top of my head I know that each hook/plugin file will need to specify a "trigger" method which would hold an array of event names to trigger on, and a "run" method, holding the actual code to execute.

tympanix commented 2 years ago

This sounds like something you would implement server side. Actually, many torrent client like rTorrent has this feature with hooks.

Also, you can quickly code something up yourself using a library for interacting with the API of your torrent client. The API implementations used in Electorrent are open source as well