Page 1 of 1

Server-side command when event occurs?

Posted: Mon Feb 28, 2022 5:44 pm
by tiwas
Hi,
Is there any way to tell deluge daemon som execute a task when a certain event occurs?

My case: I would like to scp files to another server when downloads in certain labels finishes. Is this at all possible? If not, I guess I'll have to try and find some way to react to filesystem events instead.

Thanks!

Re: Server-side command when event occurs?

Posted: Mon Feb 28, 2022 6:30 pm
by mhertz
It's possible, but requires little effort and scripting, e.g JimboMonkey1234 submitted PR for adding label support to execute plugin(I can build it for you, if need I.e if cannot yourself, dont know if will clean merge though, as from 2016), which you then filter for label upon torrent finished event, or alternatively make your own client-script/plugin doing the same i.e hook upon torrentfinishedevent and compare label before conditionally running commands/script.

Edit: Thought I remembered having extended the execute plugin myself once, but couldn't Initially find, but looking little harder I found now, though is for labelplus not label plugin, though can be easilly changed, which I can do if needed: viewtopic.php?p=233889#p233889

Re: Server-side command when event occurs?

Posted: Mon Feb 28, 2022 6:35 pm
by tiwas
mhertz wrote: Mon Feb 28, 2022 6:30 pm It's possible, but requires little effort and scripting, e.g JimboMonkey1234 submitted PR for adding label support to execute plugin(I can build it for you, if need I.e if cannot yourself, dont know if will clean merge though, as from 2016), which you then filter for label upon torrent finished event, or alternatively make your own client-script/plugin doing the same i.e hook upon torrentfinishedevent and compare label before conditionally running commands/script.

Edit: Thought I remembered having extended the execute plugin myself once, but couldn't I itially find, but looking little harder I found now, though is for labelplus not label plugin, though can be easilly changed, which I can do if needed: viewtopic.php?p=233889#p233889
Thanks. Will this be able to run on the daemon, or will I need to keep deluge client running to execute?

Re: Server-side command when event occurs?

Posted: Mon Feb 28, 2022 6:37 pm
by mhertz
Running on daemon without any clients connected. You're welcome :)

Re: Server-side command when event occurs?

Posted: Mon Feb 28, 2022 8:27 pm
by tiwas
mhertz wrote: Mon Feb 28, 2022 6:37 pm Running on daemon without any clients connected. You're welcome :)
That's really cool! I'll check with my provider, and if it's allowed I might take you up on the offer to help :)

Thanks :D