Status
Brak możliwości dodawania odpowiedzi.

altaroinj

Entry Technician
Q Associate
31 Marzec 2018
16
1
3
Odznaki
8
QNAP
TS-x53
Ethernet
1 GbE
Poz.
0
 
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 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 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
 

Załączniki

  • _event.download.sh
    1,7 KB · Wyświetleń: 147
Rozwiązanie
Until this thing is not solved by QNAP we cannot implement it. Stay tuned!
In the meantime, could you tell me where the configuration is located in order to do a backup ?

my idea is to execute all these events from the scripts in subdirs like:
Kod:
Rdownload\scripts\event.download.closed\_execute.script
I didn't really understand what you mean. Do you mean that you will duplicate _event.download script for each event in a subfloder, and that script will handle all scripts in its subfolder ?
Or do you mean, you will have a single script _event.download at root scripts folder, that will execute all scripts located in subfolders according to event type that triggered it ?
I must confess, I prefer the 2nd solution, and in...
Status
Brak możliwości dodawania odpowiedzi.

Użytkownicy znaleźli tą stronę używając tych słów:

  1. rtorrent.conf
  2. export rtorrent