1.
"?: null" is the answer
2.
I use any to be able to add audio language list to language list from filename. Then i can do a unique on it. The goal is the find all spoken language, since some file can't be detected in audio param, i want to detect from filename.
I want a result like this [FR, EN] or [FR] or [EN, SPA] or nothing.
I was planing to replace TRUEFRENCH, TRUFRENCH, VF, VFI, VFF, FRENCH by FR. ENGLISH for EN. SPANISH for SPA.
3.
If i use your code, i get something like :
[net.filebot.format.BindingException: Binding "audios": Cannot open media file: Y:\Downloads\Sleeping.with.Other.People.2015.LIMITED.MULTi.1080p.BluRay.x264-LOST.mkv] Sleeping with Other People (2015)
or like this :
[java.lang.Exception: Pattern not found] Robot Jox (1989)
My regex or your with boundary doesn't match in ".VF_" so i added ".space('.')"
With your boundary regex, i can remove ".replaceAll('-','.')"
I get closer with this, i just have some troubles with this regex :
{(any{audios.language}{[]} + any{fn.space('.').upper().matchAll(/\b(?:(?:(?:TRUE?)*?(FR)(?:ENCH)*?)|(?:(EN)(?:GLISH)*?)|(?:(SPA)(?:NISH)*?)|(?:(VF)i?))\b/)}{[]}).flatten()*.upper().unique() ?: null}
I'll try later after job tomorrow, time to sleep now
