I'm currently trying to automate my SABnzbd setup running on my QNAP NAS using an FileBot AMC bash script.
So far, the script looks like this (WIP):
Code: Select all
#!/bin/bash
# SABnzbd Post Processing Script - www.Filebot.net "AMC" Script
FILE_PATH=$1
FILE_NAME=$3
filebot -script \
fn:amc \
--output "$FILE_PATH" \
--action move \
--conflict override -non-strict \
--def music=n \
--encoding UTF-=8 \
--def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|part01|part02|par1|par2|info|com|db|md5|1|jpeg|url|lnk|html|ini|bat|com|exe|scr|sample" \
--db TheMovieDB::TV \
--lang German \
--format "{n.colon(' - ')} - {s00e00} - {t.colon(' - ')} - {vf}{' CD'+pi}{any{subt}{f.subtitle ? fn =~ /forced/ ? '.ger.forced' : '.ger' : null}}" \
--def "ut_dir=$FILE_PATH" \
--def "ut_title=$FILE_NAME"
I know that the problem is caused by having the same input and output folder, but that is actually what I want to achieve as I only want to rename the files and want them to remain in the original folder (e.g. "Moon.Knight.S01E04.German.DL.Webrip.x264-TVARCHiV/*"), moving the folder to its final location is already achieved by SABnzbd.
As far as I know, this wouldn't be possible with a different output folder in the script. Another problem is that (using a different output folder) the files I don't want to rename (nfo, jpg, png, txt, sample etc.) would not be moved to the new folder, even though I would like to keep them in the folder with the other files.
(So basically I want to reproduce the same behavior of my custom format like it would have in the GUI)
Is there any solution that would work for me? Additional bash scripts etc. would of course also do the job.