How to tell if a release has multiple artists?

I have some albums that have multiple artists but aren’t compilations. Usually they are splits where half the tracks are by one artist and half by another.

I’m wondering if there’s a way to detect this and use it so my path format can include the track artist in the filename only if the release has multiple artists on it? For example Musicbrainz Picard has a boolean variable %_multiartist% that can be used in the naming formatting for this.

Hmm; I can’t think of an easy built-in way to detect multiple artists on a release. But maybe it wouldn’t be too hard to accomplish with an inline expression?

The album-level bitrate example in the docs, for instance, shows how to “aggregate” information across an album, which seems related to what you want to do here.

I’ll give it a try, thanks!

This appears to do it:

    multiartist: |
        artist_list = set()
        for item in items:
        return len(artist_list) > 1

Thanks for the suggestion @adrian.


Cool! Just for fun, it occurs to me that there are cool Python tricks to make this a one-liner:

len({i.artist for i in items}) > 1
1 Like

I’ll try that, thanks! My Python is pretty basic.