I've just installed Filebot command line interface to manage files downloaded from Transmission.
I have build a script that I use for testing before deploying it to the Transmission work flow.
The script is s follows
Code: Select all
#!/bin/bash
# Input Parameters
ARG_PATH=$1
ARG_NAME=$2
ARG_LABEL="N/A"
LOGFILE="/var/log/transmission-post-process.log"
# Configuration
MEDIA_DIR="/media/gringotts"
/usr/bin/filebot -script fn:amc \
--output "$MEDIA_DIR" \
--action duplicate \
-non-strict "$1"
--conflict auto
--log-file /var/log/filebot.log \
--def \
unsorted=y \
music=n \
artwork=y \
subtitles=en \
seriesFormat="$MEDIA_DIR/tv-shows/{plex}"
movieFormat="$MEDIA_DIR/movies/{plex}"
excludeList=".excludes" \
deleteAfterExtract=n \
clean=y \
function edate
{
echo "`date '+%Y-%m-%d %H:%M:%S'` $1" >> "$LOGFILE"
}
edate "_____________________NEW TORRENT FINISHED ____________________"
edate "Transmission version: $TR_APP_VERSION"
edate "Time: $TR_TIME_LOCALTIME"
edate "Directory: $ARG_PATH"
edate "Torrent Hash: $TR_TORRENT_HASH"
edate "Torrent ID: $TR_TORRENT_ID"
edate "Torrent name: $ARG_NAME "
First I get the following message:
Code: Select all
[DUPLICATE] from [/path/file.mkv] to [/newpath/newfile.mkv]
cp: failed to clone '/newpath/newfile.mkv' from '/path/file.mkv': Invalid cross-device link
My main issues is that the script never exits. After the error message above, nothing happens. The file is indeed copied as I can see in the destination folder, but the log file is never written.
Any idea what may be the cause of this?
Thank you in advance