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

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

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

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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}.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

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

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply