I have something like this to tell me if it is an audio format.
This will say yes or no according to the format
Code:
program:cmp(count(template('[[format]]'), ','), 1, 'no', in_list(template('[[format]]'), ',', 'Ogg', 'Yes', 'no', ',', 'M3u', 'Yes', 'no', ',', 'M4a', 'Yes', 'no', ',', 'Mp3', 'Yes', 'no'), 'no')