rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.19k stars 415 forks source link

Can i get the output of the command executed by event.download.finished in the execute.log? #1021

Open FranciscoTrigo opened 4 years ago

FranciscoTrigo commented 4 years ago

Hello, I am trying to set up a few notifications for when a torrent finished downloading. Basically i just want to send the name of the finished torrent to an mqtt topic.

At the moment, this is what is getting written to the log: ^@bash /home/rtorrent/finishtorrent.sh [Silver Forest] Eternal Paradigm

Which makes me think its not working, because the syntax needed to manually use the finishtorrent.sh script would be: bash /home/rtorrent/finishtorrent.sh "[Silver Forest] Eternal Paradigm"

piramiday commented 4 years ago

^@ is a control character which you can usually disregard. it seems rtorrent is printing in your log file what it's supposed to, so what's the problem?

FranciscoTrigo commented 4 years ago

Thanks for your reply, after more troubleshooting I can see that the way I worded the issue is wrong, and also the answer that I wanted to get is wrong.

In the rtorrent log it looks like rtorrent executes the bash script and then the full torrent name without quotes. Is there a way to make rtorrent output the torrent name with quotes?

piramiday commented 4 years ago

I still don't understand. :confused: in the log you should first see what rtorrent executed, and then the result of the execution. quotes there do not make sense, and I don't get why they matter to you.

e.g. compare echo hello and echo "hello" -- they would both print hello! do you really want to execute echo "\"hello\"", which would print "hello"?

maybe you should try to explain better:

  1. what you are trying to accomplish,
  2. what you are currently doing, and how,
  3. what the logs show, in full.
piramiday commented 4 years ago

please remember to close this issue if the answer satisfied you.