Page 1 of 1

Rename text if a tag is missing

Posted: 22 Sep 2023, 13:40
by fedex03
Hi there,

I'm building my rename scheme and I get this:

Format: Select all

{ny} - {"[$vcf $vc $vf]"} {"[$aco $acf $af]"} [audio({audioLanguages.join(', ')}) sub({textLanguages.join(', ')})]{'.'+lang}
I wanted to specify the audio language and the subtitle (if they are embedded into the video).
Some video has not the subtitle embedded so I get a blank "sub()".

Is it possible to sky the sub part if they are missing?

Thank you in advace!

Re: Rename text if a tag is missing

Posted: 22 Sep 2023, 16:39
by rednoah
e.g. via String concatenation:

Format: Select all

{ 'sub(' + textLanguages.join(', ') + ')' }
e.g. via List.joining(delimiter, prefix, postfix) function:

Format: Select all

{ textLanguages.joining(', ', 'sub(', ')') }
:arrow: Learn how {expressions} work and useful Helper Functions