Download subtitles depending on audio language
Posted: 21 Jun 2017, 19:09
The objective is to be able to download one or more subtitles depending on the language spoken in the file.
Examples:
Initially I thought about the possibility of extending the AMC script, but I would have to download and manually edit it, and not keep it up-to-date. Then I thought about using a shell script and calling AMC and suball after it but I don't know how to tell suball to only conditionally download certain languages.
Therefore here I am looking for advice.
My current command looks something like this:
Examples:
- The Mummy (1999) - file contains a single audio stream in English -> subtitles downloaded .eng
- La dame dans l'auto avec des lunettes et un fusil (2015) - file contains single audio stream in French -> subtitles downloaded .fra and .eng
- Lo chiamavano Jeeg Robot (2015) - file contains single audio stream in Italian -> subtitles downloaded .ita and .eng
- Ghost in the Shell (1995) - file contains 2 audio streams in English and Japanese -> subtitles downloaded .eng and .jap
- Shaolin Soccer (2001) - file contains single audio stream in Cantonese -> subtitle downloaded .eng
Initially I thought about the possibility of extending the AMC script, but I would have to download and manually edit it, and not keep it up-to-date. Then I thought about using a shell script and calling AMC and suball after it but I don't know how to tell suball to only conditionally download certain languages.
Therefore here I am looking for advice.
My current command looks something like this:
Code: Select all
filebot -script fn:amc -no-xattr --output "$OUTPUT" --action test --conflict auto \
--log-file amc.log --def unsorted=y artwork=y excludeList=".excludes" \
--def subtitles=en exec="chmod 664 '{file}'" --def @/custom/scripts/pushover.txt \
--def movieFormat=@/custom/scripts/movie.groovy \
--def seriesFormat=@/custom/scripts/tvshows.groovy