Help on scripting
Posted: 09 Mar 2016, 01:40
Hi,
I am new to scripting but could find some samples that are working fine to me. But I have on doubt with the following part:
In this case if I have a DTS or AC3 on any other condition, the result is: [DTS] or [DTS+AC3] or [AC3] otherwise the result is []. I would like to have nothing as a result not []. I know that {"["} and {"]"} are returning this, but how can I make a condition with it?
I am new to scripting but could find some samples that are working fine to me. But I have on doubt with the following part:
Code: Select all
{"["}{def a= [];"[$media.Audio_Codec_List]".contains("DTS") ? a.add("DTS") : "";"[$media.Audio_Codec_List]".contains("AC3") ? a.add("AC3") : "";"[$media.Audio_Codec_List]".contains("MPEG-1 Audio layer 3") ? a.add("MP3") : "";a.join("+")}{"]"}