compilation logic

how does beets decide what is a compilation?

I have a dedicated library/directory/config with just my
soundtracks, and some of them are getting automatically
flagged as compilations. But most are not.

Also, some of them are not in musicbrainz, but I’m
not sure how that ties in.

Is the compilation flag reflected in the ID3 tags? If so, which one?

In our importer, the flag gets set if MusicBrainz makes the release as a “various artists” release—i.e., there’s no primary release artist.

TCMP. If you’re ever curious about this, here’s where to find it in the source code: beets/beets/mediafile.py at e2defe9bb89e70ea2e61ebfd38a6898cc12b7c33 · beetbox/beets · GitHub

And does beets take into account MusicBrainz’s “Secondary Types: Compilation”?

Sadly, no:

But this is a “PR-ready” feature that could use some attention if you have the bandwidth to contribute!

Heh. Wish I knew Python. Maybe one day. :slight_smile:

Thanks for the info! I was reorg-ing my music library and not using MusicBrainz at the time. So it must have been that some of my tracks had TCMP set and some didn’t. If I used a tag editor to set TCMP consistently then it probably would have worked better. It would be nice if the mapping between ID3 tags and beets fields could be dumped using a command line option to help people understand what’s going on.

Great idea for a plugin! You’d also want to print out mappings for other formats too, naturally.

Here is my solution to this problem, since I have different paths for OST’s and compilations, I took advantage of how beets reads the path configurations. Since I wanted to an album to go to OST if it had ost and compilation I put my ost path configuration above the compilation path configuration. The way the path configuration works is it’ll read the path configuration options one by one and the first one it matches is the one it’ll use, so if my music matches multiple path configuration options then sort out the most wanted one to the top of our path configuration list.

P.s. Default is the last path configuration option used if it cant match to any of the other options.

Sorry for the necro post, just realised my mistake, but any future users may make use of this so i’ll leave it up

1 Like