rTorrent. Event not triggered, script not executed?
Posted: 30 Nov 2014, 18:46
Hi.
First of all, thanks a lot for a nice program. I have been trying to set up AMC according to the official guide here:
viewtopic.php?f=4&t=215
I am running rTorrent on FreeBSD.
In .rtorrent.rc, I have appended the following at the bottom and restarted rTorrent several times:
system.method.set_key=event.download.finished,filebot_amc,"execute={~/rtorrent-postprocess,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
In the same folder, that is the home folder of my service account, I have created a file rtorrent-postprocess with the following content:
#!/usr/local/bin/bash
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3
java -jar ~/FileBot/FileBot.jar -script fn:amc --output "/mnt/" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y --def xbmc=htpc --def "seriesFormat=/tvshows/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "ut_dir=$TORRENT_PATH" "ut_kind=multi"
"ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &
I can run ~/rtorrent-postprocess from the terminal, but the script fails for obvious reasons (no parameters supplied). The error is written to the ~/.filebot/logs/amc.log log file.
However, rTorrent does not seem to trigger AMC. When a new download has finished, nothing seems to happen with the files and nothing is written to the ~/.filebot/logs/amc.log log file.
Any suggestions?
First of all, thanks a lot for a nice program. I have been trying to set up AMC according to the official guide here:
viewtopic.php?f=4&t=215
I am running rTorrent on FreeBSD.
In .rtorrent.rc, I have appended the following at the bottom and restarted rTorrent several times:
system.method.set_key=event.download.finished,filebot_amc,"execute={~/rtorrent-postprocess,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
In the same folder, that is the home folder of my service account, I have created a file rtorrent-postprocess with the following content:
#!/usr/local/bin/bash
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3
java -jar ~/FileBot/FileBot.jar -script fn:amc --output "/mnt/" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y --def xbmc=htpc --def "seriesFormat=/tvshows/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "ut_dir=$TORRENT_PATH" "ut_kind=multi"
"ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &
I can run ~/rtorrent-postprocess from the terminal, but the script fails for obvious reasons (no parameters supplied). The error is written to the ~/.filebot/logs/amc.log log file.
However, rTorrent does not seem to trigger AMC. When a new download has finished, nothing seems to happen with the files and nothing is written to the ~/.filebot/logs/amc.log log file.
Any suggestions?