Run filebot script on "Force torrent recheck"

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
bigdownloads
Posts: 1
Joined: 01 Mar 2019, 17:09

Run filebot script on "Force torrent recheck"

Post by bigdownloads » 01 Mar 2019, 17:42

Is there any way to call filebot post process in rtorrent.rc using the "fore torrent recheck" option as well as the when a download finishes ? Id like to have a second way to process files that are either incorrectly sorted or require a manual sorting after wards with different parameters. My main issue is that filebot amc is not sorting my BDMV movies and id like a way to reprocess files using different names upon a recheck. filebot runs my script perfectly after download, but when trying to execute manually ./rtorrent-postprocess....is says parameter not set. I understand basic scripting but maybe there is something im missing to stitch all of this together ?

./rtorrent-postprocess.sh
./rtorrent-postprocess.sh: 4: ./rtorrent-postprocess.sh: 1: parameter not set

EDIT: it process the files overnight, but with the wrong root folder name, and it didnt actually change the file.mt2s files to respective episode names even upon matching with incorrect TV show title.

MY SCRIPT:

#!/bin/sh -xu

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/home/processed/"

if [ "$3" = 'filebot' ]; then
filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" &
fi


Any information would be great.

User avatar
rednoah
The Source
Posts: 16546
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Run filebot script on "Force torrent recheck"

Post by rednoah » 01 Mar 2019, 18:02

1.
If you have video chunks which contains bits and pieces of episodes, with no identifiable information in the filename, then FileBot won't work.

e.g. identifiable:

Code: Select all

Firefly.1x07
e.g. not identifiable:

Code: Select all

disk01

2.
Your shell script takes 3 arguments and will abort if not all 3 are specified.

You can call the script, just like rtorrent does, but you'll need to pass input arguments like rtorrent does as well.
:idea: Please read the FAQ and How to Request Help.

Post Reply