Only include specific languages

All about user-defined episode / movie / file name format expressions
Post Reply
PatesCarbo
Posts: 1
Joined: 25 Jan 2021, 08:51

Only include specific languages

Post 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!
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Only include specific languages

Post 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
:idea: Please read the FAQ and How to Request Help.
Post Reply