Multiple subs for same language in separate folder

Support for Windows users
Post Reply
Dyolfknip
Posts: 7
Joined: 30 Dec 2019, 17:01

Multiple subs for same language in separate folder

Post by Dyolfknip »

I keep running into this case (typically for TV shows) where the subtitles in the download are all stored in a separate SUBS folder, organized thusly:

Code: Select all

\Firefly\Firefly.1x01.Serenity.Pilot.avi
\Firefly\Firefly.1x02.The Train.Job.avi
\Firefly\Subs\Firefly.1x01.Serenity.Pilot\2_English.srt
\Firefly\Subs\Firefly.1x01.Serenity.Pilot\3_English.srt
\Firefly\Subs\Firefly.1x02.The.Train.Job\2_English.srt
\Firefly\Subs\Firefly.1x02.The.Train.Job\3_English.srt
It's pretty good at identifying the subtitle files based on the containing episode-specific directory, but only for the first match. It really can't deal with the multiple files for the same language. It'll look at the leading 3 and assume that's an episode or season number or something. I'm pretty sure I've got a preset written that can ensure the output is unique, but it's gotta correctly match the file first. Help?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Multiple subs for same language in separate folder

Post by rednoah »

:?: Are you using the GUI? Screenshots? Are you using the CLI? Logs? Please read How to Request Help.


:idea: It should fundamentally work. I'm using the latest revision and identification works correctly out-of-the-box for this kind of use case:

Code: Select all

$ filebot -rename -r Firefly --db TheTVDB --order DVD --output . --conflict index -non-strict --log INFO --action DUPLICATE
[DUPLICATE] from [Firefly/Subs/Firefly.1x01.Serenity.Pilot/2_English.srt] to [Firefly - 1x01 - Serenity.srt]
[DUPLICATE] from [Firefly/Subs/Firefly.1x02.The.Train.Job/2_English.srt] to [Firefly - 1x02 - The Train Job.srt]
[DUPLICATE] from [Firefly/Subs/Firefly.1x01.Serenity.Pilot/3_English.srt] to [Firefly - 1x01 - Serenity.1.srt]
[DUPLICATE] from [Firefly/Subs/Firefly.1x02.The.Train.Job/3_English.srt] to [Firefly - 1x02 - The Train Job.1.srt]
[DUPLICATE] from [Firefly/Firefly.1x01.Serenity.Pilot.mkv] to [Firefly - 1x01 - Serenity.mkv]
[DUPLICATE] from [Firefly/Firefly.1x02.The Train.Job.mp4] to [Firefly - 1x02 - The Train Job.mp4]

:idea: Typical usage with the {plex} format will allow you to have one subtitle per subtitle language / subtitle tag / subtitle extension (i.e. you can have .eng.srt and .eng-forced.srt but not .eng.srt twice) and so alternate subtitles will be ignored, unless you use a custom --format that accounts for that in one way or another:

Code: Select all

$ filebot -rename -r Firefly --db TheTVDB --order DVD --output . --format "{plex}" -non-strict --log INFO --action DUPLICATE
[DUPLICATE] from [Firefly/Subs/Firefly.1x01.Serenity.Pilot/2_English.srt] to [TV Shows/Firefly/Season 01/Firefly - S01E01 - Serenity.eng.srt]
[DUPLICATE] from [Firefly/Subs/Firefly.1x02.The.Train.Job/2_English.srt] to [TV Shows/Firefly/Season 01/Firefly - S01E02 - The Train Job.eng.srt]
Skipped [Firefly/Subs/Firefly.1x01.Serenity.Pilot/3_English.srt] because [TV Shows/Firefly/Season 01/Firefly - S01E01 - Serenity.eng.srt] already exists
Skipped [Firefly/Subs/Firefly.1x02.The.Train.Job/3_English.srt] because [TV Shows/Firefly/Season 01/Firefly - S01E02 - The Train Job.eng.srt] already exists
[DUPLICATE] from [Firefly/Firefly.1x01.Serenity.Pilot.mkv] to [TV Shows/Firefly/Season 01/Firefly - S01E01 - Serenity.mkv]
[DUPLICATE] from [Firefly/Firefly.1x02.The Train.Job.mp4] to [TV Shows/Firefly/Season 01/Firefly - S01E02 - The Train Job.mp4]
:idea: Please read the FAQ and How to Request Help.
Dyolfknip
Posts: 7
Joined: 30 Dec 2019, 17:01

Re: Multiple subs for same language in separate folder

Post by Dyolfknip »

Was using the GUI. Looks like it was a version issue. 4.9.2 didn't work, but updating to 4.9.6 fixed it. Thanks!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Multiple subs for same language in separate folder

Post by rednoah »

You can use the {di} duplicate index and {dc} duplicate count bindings to add a numeric index if you have the same match multiple times:

Code: Select all

{ dc > 1 ? '.' + di : null }


EDIT:

FileBot r9240 fixes {di} duplicate index and {dc} duplicate count not working correctly the command-line in some cases.
:idea: Please read the FAQ and How to Request Help.
Post Reply