Plugin: guess source media from (auxiliary) files


It often happens, that a release has many different media types (CD, Vinyl, Cassette, …) and sometimes beets picks the wrong media type.
To help with this I quickly prototyped a small plugin which checks the media files (bitdepth/samplerates) and any auxiliary files (EAC/XLD logs) to determine if the source media was likely a CD or likely not a CD and applies penalities for candidates accordingly.

The (incomplete) script can be found here:

My question now is: Would such a thing be better suited as a standalone plugin or should it rather be a part of beets itself?
And can anyone think of more checks we can make to further enhance the likelyhood of beets selecting the correct release?


Nice! This seems like something people often need. I like the idea of keeping it a plugin, because it represents a self-contained unit of additional functionality, but it’s the kind of plugin we could imagine shipping with beets.

In general, we don’t have a codified policy for how to decide when a plugin says “third party” and when it can be included. But basically, we need to get it up to a certain level of code quality/maintainability so we can do support for it in the future—and the usage documentation has to be pretty thorough. If you’re interested, I’d be happy to help with the integration.


That sounds great!
Give me some time to polish it and maybe add some other heuristics.
In the meantime other people have the chance to provide their input as well.


I added (same gist link) something to extract the TOC from the EAC/XLD logs, to automatically get the release IDs from musicbrainz based on the TOC, which works quite well for me.
But I’m not sure if the EAC/XLD log parsing / TOC extraction thing should be part of the same plugin.