seedbox rutorrent postprocess 4k sorting script help

Any questions? Need some help?
Post Reply
Truk22
Posts: 1
Joined: 05 Mar 2020, 05:13

seedbox rutorrent postprocess 4k sorting script help

Post by Truk22 »

Hi,

I have been using filebot with the built in script on my seedbox without issue. I wanted to take it one step further and do some sorting for 4k movies and tv shows. I have read through the posts on here and faq on my seedbox (not sure if it allowed to name which one) to try and add the lines into the script. Each time I try and then download a torrent, the script does not run, I dont get any errors in the log, so I don't know where I am going wrong. I do not know very much about scripting. For me it is a lot of trial and error until I work it out, however I am stumped on this one because the string I try in the gui works, but I do not know where I am going wrong in the postprocess.sh to stop it from working at all.

This is the script that works

Code: Select all

#!/bin/bash

export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"

TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3

# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y

filebot -script /opt/filebot/scripts/amc.groovy \
    --output "$HOME/media" \
    -non-strict --encoding utf8 --log all --log-file amc-rtorrent.log --action symlink --conflict override \
    --def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
	extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &

and this is the one I modified that does not:

Code: Select all

#!/bin/bash

export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"

TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3

# Subtitle language
SUBLANG=en,dk
SKIP_EXTRACT=n
MUSIC=n

filebot -script /opt/filebot/scripts/amc.groovy \
    --output "$HOME/media" \
    -non-strict --encoding utf8 --log all --log-file amc-rtorrent.log --action copy --conflict override \
    --def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" \
    --def movieFormat="{fn =~ /2160p|uhd|UHD|4k|4K/ ? 'Movies 4K' : 'Movies'}/{n} ({y})/{n} ({y})" \
    --def excludelist=amc.txt \
    subtitles=$SUBLANG \
    extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Thank you for any help in advance.
User avatar
rednoah
The Source
Posts: 22978
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: seedbox rutorrent postprocess 4k sorting script help

Post by rednoah »

What happens if you call your script manually? It's just a shell script. Pretend to be rT and call it yourself and see what it says.


What does the console output say? If filebot isn't called, then the shell interpreter will print errors to standard error telling you why it couldn't call filebot.


:idea: Please read Shell Script Debugging for Beginners.
:idea: Please read the FAQ and How to Request Help.
Post Reply