I've created a rtorrent-postprocess.sh file that works as designed if manually called
Code: Select all
#!/bin/sh
# debugging - must work
date > /tmp/date.txt
whoami > /tmp/whoami.txt
# Input Parameters
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3
# Configuration
CONFIG_OUTPUT="/home/user/files/processed"
CONFIG_INPUT="/home/user/files/downloads"
filebot -script fn:amc "$CONFIG_INPUT" --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file "/home/user/amc.log" --def unsorted=y music=n artwork=n excludeList=".excludes" ut_dir="$TORRENT_PATH" ut_kind="multi" ut_title="$TORRENT_NAME" ut_label="$TORRENT_LABEL" &
# debugging - may not work
filebot -script fn:sysenv > /tmp/filebot-sysenv.txt 2>&1
Code: Select all
method.set_key=event.download.finished,filebot,"execute={/home/user/rtorrent-postprocess.sh,$d.base_path=,$d.name=,$d.custom1=}"
Two things did stick out to me from the amc.log file that was created when I then ran the postprocessing script manually:
1)
Code: Select all
SEVERE: Unable to set localhost. This prevents creation of a GUID. Cause was: jimmybraun-seedbox.cloud.seedboxes.cc: jimmybraun-seedbox.cloud.seedboxes.cc: Name or service not known
java.net.UnknownHostException: jimmybraun-seedbox.cloud.seedboxes.cc: jimmybraun-seedbox.cloud.seedboxes.cc: Name or servicenot known
2)
Code: Select all
jimmybraun@jimmybraun-seedbox:~$ Run script [fn:amc] at [Sat Sep 30 16:12:33 UTC 2017]
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: excludeList = .excludes
Parameter: ut_dir =
Parameter: ut_kind = multi
Parameter: ut_title =
Parameter: ut_label =
Argument[0]: /home/user/files/downloads
Use excludes: /home/user/files/processed/.excludes
Code: Select all
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3
Filebot was just step 1 in my process to automate everything, and I still need to get lftp or rsync running to transfer the files over when completed, which I hope goes smoother than this.
Thanks in advance!