can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Any questions? Need some help?
Post Reply
abescalamis
Posts: 17
Joined: 26 Jan 2018, 04:10

can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Post by abescalamis » 15 Feb 2018, 20:01

I use this to rename and add the language code to the srt subtitles {'.'+lang}, but it uses spa and eng, I would prefer ES and EN.

is even possible to make filebot to do that?

Thanks

User avatar
rednoah
The Source
Posts: 14528
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Post by rednoah » 16 Feb 2018, 01:04

Yes. You can have your custom format yield 2-letter language codes:

Code: Select all

{'.'+lang.ISO2}
:idea: Please read the FAQ and How to Request Help.

abescalamis
Posts: 17
Joined: 26 Jan 2018, 04:10

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Post by abescalamis » 16 Feb 2018, 01:06

You are awesome thank you

User avatar
devster
Posts: 149
Joined: 06 Jun 2017, 22:56

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Post by devster » 16 Feb 2018, 14:05

Does this also work with the {subt} binding or for fn:suball?
I only work in black and sometimes very, very dark grey. (Batman)

User avatar
rednoah
The Source
Posts: 14528
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Post by rednoah » 20 Feb 2018, 10:42

No. The suball script does not support custom format expressions at all. If you use --format MATCH_VIDEO_ADD_LANGUAGE_TAG (e.g. i.e. --format constant for -get-subtitles) then you'll always get ISO 639-3 language codes.

You can use -rename --db xattr -non-strict to batch process files offline with your own --format and this way you can change 3-letter language codes to 2-letter language codes.
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest