Difference in subtitle language codes among scripts

Support for Windows users
Post Reply
appiekap653
Posts: 9
Joined: 13 Apr 2018, 17:04

Difference in subtitle language codes among scripts

Post by appiekap653 »

I use 2 scripts with Filebot that fetch and renames subtitle files to Plex format.

The first one is: Amc script with --def Subtitles=nl
The second one is: Suball with --lang nl

The Amc script is renaming the files with .dut code
The Suball script is renaming the files with .nld code

The problem I have is that Plex won't recognize .nld, it only recognize .dut or .nl

Is it possible to edit the language code for the Suball script with some parameter?

My command at this moment is:

Code: Select all

filebot -script fn:suball "F:/Library/TV Shows" -non-strict --def maxAgeDays=20 --lang nl --log-file "F:/Library/MisSub.log"

And how is it possible that both scripts adds different language codes while both are calling the following the same?

Code: Select all

getMissingSubtitles(lang: nl, format: 'MATCH_VIDEO_ADD_LANGUAGE_TAG'
I found an other post about this same issue:
f3bruary wrote: 10 Jun 2014, 19:46 The Netherlands has two 3 digit language codes, NLD and DUT. Filebot writes to NLD but Plex cannot identify this. It will identify DUT however so my question is whether I can make filebot use the other variant (DUT) instead of NLD
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Difference in subtitle language codes among scripts

Post by rednoah »

The amc script downloads subtitles just the same, but then renames video and subtitle files using the {plex} format, which internally uses the {subt} binding, which translates language codes from various standards to the one that Plex needs.

You can use this command to find all *.nld.srt files and normalize the subtitle suffix using the {subt} binding:

Code: Select all

filebot -rename -r /path/to/files --db xattr -non-strict --filter "fn.endsWith('.nld')" --format "{fn.nameWithoutExtension}{subt}"
:idea: Please read the FAQ and How to Request Help.
Post Reply