Created plugin: Find release from barcode


I have a lot of self-ripped CDs with scanned art and noticed that beets does not always pick the correct release because it doesn’t have the necessary information.

So I created a plugin which let’s the user input a barcode (or catalogue number), to aid in selecting the correct release.
Additionally, and more importantly, it also looks for image files and tries to read barcodes from these images. If a barcode is found, it gets the release-id from musicbrainz and penalizes releases which don’t correspond to the found barcode(s).

There are still some rough edges:

  • I’m unsure about how to make it clear to the user which candidate corresponds to a barcode that was found by scanning the image files.
  • It’s not an actual installable plugin yet. Just a file you copy to the beetsplugs directory.

I would really appreciate it If anyone could help me test it and look over the code to tell me about all the things i did wrong.
For anyone willing to try it in this early-stage, you can find the plugin here:
If anyone is interested in this, I plan to continue improving it and releasing it as an actual plugin.

Future work / slightly offtopic:

For me it already works great and helps a lot, but I plan on making another plugin that helps me further with selecting the right release (if the barcode does not help). e.g. sometimes beets selects a “Vinyl” release when there is clearly an EAC logfile, or it selects “CD” when the files are clearly high-resolution audio files. I plan to tackle these problems in a seperate plugin.


Wow; this is incredibly cool! This seems like it could be really useful for people with large physical music collections. Awesome work.

I glanced over the code and everything looks good on first glance. One gentle recommendation is to consider writing documentation at this stage, even before the rest of the plugin is finished, to help convey your vision for how things are supposed to work. This could help people navigate the code too.


Thanks for the quick feedback! I added some rudimentary docstrings, but will improve the overall code readabilty in the next couple of days as well as make it an actual plugin, so that more people can use it more easily.

It is now installable as a plugin and I have added installation instructions as well as a description.
I would appreciate any feedback from potential users/testers.


Looking great! I added a link from the Plugins page in our documentation to the repository for your plugin.


That’s great!


After some refining and testing/using, the only feature I’d need from beets now, would be to also print the catalogue number in the disambig_string function. Otherwise it’s impossible to distinguish between some of the candidates without any unique identifiers.
Would this be something you would consider adding to beets?
If so, should I create a github issue/pr for that?


Sure; that definitely sounds reasonable!