How to determine if tag has uniform or multiple values across album tracks

Hi all. Is there a way to have a script that determines if a tag varies within an album? For example, I’d like a script to return ‘true’ if an album has more than one composer, or albumartist. I would then set a tag based on that result.


You mean from your files in MusicBrainz Picard tagger?
Or from the MusicBrainz website and display this info on the website?

Sorry, Picard tagger.

1 Like

I’m not sure about ‘Composer’, but you can do something like the following to determine whether there are multiple ‘Album Artists’. Warning: Untested code follows:


Note that this should set the variable %_is_multi_artists% to ‘1’ if true and an empty string if false so that it can be used in other logic tests in your script.


Thanks. I’ll give that a shot and report back.

This seems to work, but I may be making it too hard. I think testing if “_multiartists=1” may be ample for ID’ing multiple primary artists. If ‘true’, I set albumartist to “[Multiple Artists]” as has been my standard practice.

I have also always added additional artists to the ‘Artist’ field. So Picard is natively set up kinda backwards to my approach. I’ve added rdswift’s “Additional Artists Variables” plugin, but it’s not helping here. I’d like to concatenate additional artists (e.g. orchestra, conductor) to Picard’s artist field, but in the release I tested with two composers, the second composer while a second “primary” was unfortunately included in the plugin’s additional artist list.

So instead I’m using the semicolon within the total artist field to separate additional artists, then concat’ing them to the original artist which is the proper composer for each track. That seems to be working well so far.

Thanks for your help!