Page 1 of 1

AMC Script Invokes Exec Script with Type "Movie" for .srt Subtitle File

Posted: 13 Apr 2022, 18:09
by HarryMuscle
I have the following movie files that are being processed by FileBot's AMC script

Code: Select all

Star.Trek.2009.720p.BrRip.x264.mp4
Star.Trek.2009.720p.BrRip.x264.srt
and I use the following exec parameter with the AMC script

Code: Select all

--def exec="/config/postprocess.sh -d {quote folder} -f {quote f} -t {quote type}"
however, when my post process script gets called the type parameter is "Movie" for both the mp4 and the srt file. Shouldn't the type be "Subtitle" for the srt file? Or are all movie related files flagged as "Movie" type?

Thanks,
Harry

Re: AMC Script Invokes Exec Script with Type "Movie" for .srt Subtitle File

Posted: 13 Apr 2022, 18:27
by rednoah
HarryMuscle wrote: 13 Apr 2022, 18:09 Shouldn't the type be "Subtitle" for the srt file? Or are all movie related files flagged as "Movie" type?
No, {type} is not the file type, but the match type, which is either Movie, or Episode, or MoviePart, or MultiEpisode, etc. You probably mean to pass along {ext} so that your script can do different things for video files or subtitle files, though you can already do that based on {f}.

Re: AMC Script Invokes Exec Script with Type "Movie" for .srt Subtitle File

Posted: 14 Apr 2022, 21:56
by HarryMuscle
rednoah wrote: 13 Apr 2022, 18:27
HarryMuscle wrote: 13 Apr 2022, 18:09 Shouldn't the type be "Subtitle" for the srt file? Or are all movie related files flagged as "Movie" type?
No, {type} is not the file type, but the match type, which is either Movie, or Episode, or MoviePart, or MultiEpisode, etc. You probably mean to pass along {ext} so that your script can do different things for video files or subtitle files, though you can already do that based on {f}.
Thanks for the info.

Re: AMC Script Invokes Exec Script with Type "Movie" for .srt Subtitle File

Posted: 15 Apr 2022, 03:30
by rednoah
e.g. called once

Code: Select all

--def exec="echo 1"
e.g. called once per folder:

Code: Select all

--def exec="echo {quote folder}"
e.g. called once per file:

Code: Select all

--def exec="echo {quote f}"
e.g. called once per series / movie:

Code: Select all

--def exec="echo {quote id}"
e.g. called once per match:

Code: Select all

--def exec="echo {quote object}"
:arrow: This is probably what you're looking for. Because the video file and corresponding subtitle file get matched to the same match object.