Hello all,
first of all, and I may repeat myself, thanks again for rtorrent. It's one of the few apps I did not hesitate to pay for, and I don't regret it.
Then, I would like to suggest @Silas Mariusz 2 things to improve.
1. If it's not possible to automatically backup main configuration page at each stop/start of the app for example, do you think we could have a way to export/import it ?
Because, each time the app is updated, we need to reconfigure everything as the configuration is reset to default.
2. I use the feature that allows me to execute script on finished downloads. I use it mainly for sending notification on my phone using pushover service (I can share my script if someone wants to do the same).
But, rtorrent handles a lot of event types and some I would like to use too.
So I renamed "_event.download.finished" into "_event.download", and modified it in order to be able to do the same, but for all event types.
You can find it attached to the thread (with sh extension because otherwise it was not accepted).
Just to explain, I only set the 3 first arguments as mandatory, because for inserted* events there is no path yet for the downloaded file.
And I splitted log files (one by event type) as differrent event types can occur at the same time and logs of executed scripts would be mixed between each other if I hadn't.
I kept the main log file for debug purpose (if the DEBUG variable is set to 1).
So with this new script, I modified "rtorrent/etc/rtorrent.conf" in order to comment the line :
And I added these lines instead :
Everything worked as expected.
My question now is, do you think @Silas Mariusz that these enhancements could be part of one of your further release (in order to avoid resetup everything after each update) ?
Thanks in advance for your response.
Firmware version: 4.4.2.1270 Build 20200410
Model name: QNAP TS-253Pro
first of all, and I may repeat myself, thanks again for rtorrent. It's one of the few apps I did not hesitate to pay for, and I don't regret it.
Then, I would like to suggest @Silas Mariusz 2 things to improve.
1. If it's not possible to automatically backup main configuration page at each stop/start of the app for example, do you think we could have a way to export/import it ?
Because, each time the app is updated, we need to reconfigure everything as the configuration is reset to default.
2. I use the feature that allows me to execute script on finished downloads. I use it mainly for sending notification on my phone using pushover service (I can share my script if someone wants to do the same).
But, rtorrent handles a lot of event types and some I would like to use too.
So I renamed "_event.download.finished" into "_event.download", and modified it in order to be able to do the same, but for all event types.
You can find it attached to the thread (with sh extension because otherwise it was not accepted).
Just to explain, I only set the 3 first arguments as mandatory, because for inserted* events there is no path yet for the downloaded file.
And I splitted log files (one by event type) as differrent event types can occur at the same time and logs of executed scripts would be mixed between each other if I hadn't.
I kept the main log file for debug purpose (if the DEBUG variable is set to 1).
So with this new script, I modified "rtorrent/etc/rtorrent.conf" in order to comment the line :
Kod:
# method.set_key = event.download.finished,bash_handlers2,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download.finished\"),$d.hash=,$d.name=,$d.base_path=,$d.custom1="
And I added these lines instead :
Kod:
method.set_key = event.download.closed,closed_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),closed,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.erased,erased_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),erased,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.finished,finished_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),finished,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.hash_done,hash_done_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),hash_done,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.hash_queued,hash_queued_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),hash_queued,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.hash_removed,hash_removed_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),hash_removed,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.inserted,inserted_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),inserted,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.inserted_new,inserted_new_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),inserted_new,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.inserted_session,inserted_session_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),inserted_session,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.opened,opened_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),opened,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.paused,paused_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),paused,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
method.set_key = event.download.resumed,resumed_bash_handler,"execute.nothrow.bg=(cat,(cfg.scripts),\"_event.download\"),resumed,$d.hash=,$d.name=,$d.base_path=,$d.custom1="
Everything worked as expected.
My question now is, do you think @Silas Mariusz that these enhancements could be part of one of your further release (in order to avoid resetup everything after each update) ?
Thanks in advance for your response.
Firmware version: 4.4.2.1270 Build 20200410
Model name: QNAP TS-253Pro