You broke the expression. Here I fixed it: {audios.collect{ a -> allOf{[any{a.CodecIDHint}{a.Codec}, a.Channels+'ch']}{a.Language} }.findAll{ it[1] }.groupBy{ it[0] }.collect{ k, v -> k + v*.get(1) }.flatten().join('.') } See how the groupBy key is a Array of Codec/Channels. :ugeek: That's it ...
any{a.CodecIDHint}{a.Codec} I tried this: {audios.collect{ a -> allOf{any{a.CodecIDHint}{a.Codec}}{a.Language} }.findAll{ it[1] }.groupBy{ it[0] }.collect{ k, v -> k + v*.get(1) }.flatten().join('.') } but get no value (just blank). I also tried: {audios.collect{ a -> allOf{[{if (a.CodecIDHint ...
This is how I'd write that: {audios.collect{ a -> allOf{[a.codec, a.channels+'ch']}{a.Language} }.findAll{ it[1] }.groupBy{ it[0] }.collect{ k, v -> k + v*.get(1) }.flatten().join('.') } If you use a binding that is undefined/null/etc it'll cause an Exception to be thrown. So you can catch that ...
Hi, I'd like to read out all Audio Informations, which is working great with most of my files. This is my scheme: {'.' + audios.groupBy{ it.Codec + '.' + it.Channels.replaceAll(/[' ']/, "-") + 'ch' }.collect{ c, a -> [c] + a*.Language }.flatten().join('.')} The problem is, if files doesn't include ...