Page 1 of 1
Do not download subtitles if folder already contains subtitles
Posted: 09 Aug 2019, 08:27
by gaoden12
HI all,
Question on subtitles,
Is there a way to set if the directory has subtitles, not to download from opensubtitles.
Second question, is there a way to change the srt file if exists to .eng.srt?
Thanks for you help.
Re: The directory has subtitles
Posted: 09 Aug 2019, 12:11
by rednoah
I will assume that you're using the CLI, and
not the GUI.
gaoden12 wrote: ↑09 Aug 2019, 08:27
Is there a way to set if the directory has subtitles, not to download from opensubtitles.
Yes, the use
--file-filter option to include / exclude input files from processing:
Code: Select all
filebot -r . --file-filter '!folder.listFiles{ it.subtitle }' ...
gaoden12 wrote: ↑09 Aug 2019, 08:27
Second question, is there a way to change the srt file if exists to .eng.srt?
Yes, use
--db file to process generic files and use
--file-filter option to include / exclude input files from processing:
Code: Select all
filebot -rename --db file -r . --file-filter 'any{ f.subtitle && !lang }{ true }' --format '{fn}.eng'
{lang} is never undefined, and throws an error instead of returning a null or undefined value, so we need to use
any{}... to work around that, to explicitly include files where
{lang} fails.