Page 1 of 1

Only include specific languages

Posted: 25 Jan 2021, 09:01
by PatesCarbo
Hello,

I'm using the {audioLanguages} and {textLanguages} bindings but would like for it to only apply to specific languages (eng and fra as these are the only ones I care about).

I'm guessing I have to use some if-something function but I have no idea how to write it properly. Here's what my current expression looks like :

Code: Select all

{plex} {audioLanguages} {[vf, vc, hdr, aco, channels]} {textLanguages}
I also have a second question, is there a way for the {aco} binding to show DTS-HD MA or Dolby Atmos instead of the lenghty DTS-HD Master Audio and Dolby TrueHD with Dolby Atmos ? {ac} only gives me DTS or MLP.

Thanks in advance!

Re: Only include specific languages

Posted: 25 Jan 2021, 10:56
by rednoah
1.
You could use {audioLanguages} and then filter out all the non-English / non-French values:

Code: Select all

audioLanguages.grep ~/eng|fra/

2.
You can access MediaInfo properties directly, or use {aco} with some custom find-and-replace logic:
viewtopic.php?t=4285

e.g.

Code: Select all

aco =~ /DTS.HD/ ? /Dolby Atmos/ : null