Conditional formating "LANG"
Posted: 20 Dec 2017, 12:31
Dear all
I have a bit a hard time to figure out the correct syntax. Maybe someone could give me a hand?
I would like to label video files according their language - if any has been detected by filebot. If none has been found, it should remain empty.
Therefore I have {lang} in my formating.
Example
if I have "Avatar2017.stuff.n.things.mp4" in English and would like to get "Avatar (2017).eng.mp4".
So far, so good.
However, if "lang" hasn't been detected, it remains empty and gives "Avatar (2017)..mp4". I would like it to be substituted with "NOLANG".
I was trying with no luck:
- {lang ~= // ? lang : 'NOLANG'}
- {lang = "" ? 'NOLANG' : lang}
- {lang.length < 2 ? lang : 'NOLANG'}
How would it be correct?
Kind regards
n3
I have a bit a hard time to figure out the correct syntax. Maybe someone could give me a hand?
I would like to label video files according their language - if any has been detected by filebot. If none has been found, it should remain empty.
Therefore I have {lang} in my formating.
Example
if I have "Avatar2017.stuff.n.things.mp4" in English and would like to get "Avatar (2017).eng.mp4".
So far, so good.
However, if "lang" hasn't been detected, it remains empty and gives "Avatar (2017)..mp4". I would like it to be substituted with "NOLANG".
I was trying with no luck:
- {lang ~= // ? lang : 'NOLANG'}
- {lang = "" ? 'NOLANG' : lang}
- {lang.length < 2 ? lang : 'NOLANG'}
How would it be correct?
Kind regards
n3