Code: Select all
[{ac}{audio[0].format_profile =~ /Atmos/ ? '+Atmos' : ''} {channels}]
I have found a few movies that the Atmos track is not on audio[0]. For example the movie I am testing script changes with has:
Code: Select all
audio[0]. format_profile = MA / Core
audio[1]. format_profile = TrueHD+Atmos / TrueHD
audio[2]. format_profile = null (Binding “format_profile”: undefined)
audio[3]. format_profile = MA / Core
audio[4]. format_profile = null
audio[5]. format_profile = null
Code: Select all
def myList = ["MA / CoreTrue","HD+Atmos / TrueHD", null, "MA / Core",null,null]
println myList.any { it =~ /Atmos/ } ? "ATMOS" : "NO"
Code: Select all
[{ac}{audio.format_profile.any { it =~ /Atmos/ } ? '+Atmos' : ''} {channels}]