my postprocess is as follows
Code: Select all
\#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Volumes/Media/Incomplete/complete" --log-file amc.log --action copy --conflict override -non-strict --def deleteAfterExtract=y music=y plex=gallo artwork=y subtitles=en clean=y "ut_dir=/Volumes/Media/Incomplete/complete/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" "seriesFormat=/Volumes/Media/TV/{n.replaceTrailingBrackets()}/Season {s}/{n.replaceTrailingBrackets()} -S{s}E{e.pad(2)} - {t}-[{vf},{af}]{'.'+lang}" "movieFormat=/Volumes/Video/M0vies/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} ({y}) [{certification}]/{n} ({y}) [{certification}]-[{vf},{af}]{'.'+lang}" "musicFormat=/Volumes/Media/Muzik2iTunes/TransDL/{n}/{artist} -{album}-[{pi.pad(2)}]-{t}"
RemoveTrailingBrackets
Code: Select all
{n.removeTrailingBrackets()}
however I would like to include
Code: Select all
{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)}
if I use "Brackets" I get
/path/to/folder/The Americans/Season X/...
however if i use "first"
/path/to/folder/Americans (2013),The/Season X/...
Ideally
/path/to/folder/Americans, The/Season X/The Americans SxxExx - title.ext