Closed BitterSweetcandyshop closed 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
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
Rclone Auto DL A use case would be rclone auto copying. Currently I have to wait until it's done downloading, then copy the files over sftp. It would be better though to trigger a js script which would give access to the torrent name, so I can automate running this rclone command.
Clean and Try with New Another use case on torrent failure is to have a script run, tell *arr and rtorrent to clean up, and find another torrent.
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.