I am running this little script, invoked by Deluge upon download completion:
Code: Select all
#!/bin/bash
TORRENT_ID=$1
TORRENT_NAME=$2
TORRENT_PATH=$3
LOG_FILE="${HOME}/deluge-postprocess.log"
filebot -script fn:amc --output "$HOME/Videos" --log-file amc.log --action move --conflict override -non-strict --def artwork=n subtitles=en,he "ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_kind=multi" "ut_title=#$TORRENT_NAME" &>> "${LOG_FILE}"
rm -frv "/$TORRENT_PATH/$TORRENT_NAME" &>> "${LOG_FILE}"
I tried retrieving ?$ - Filebot's exit code - but it is always 0. How can I tell if Filebot succeeded in renaming or not?
Thanks!