How to use mbcollection plugin?

I’m setting up beets for the first time but I can’t get the mbcollection plugin to work. I’m not understanding the documentation, and it doesn’t seem to be behaving as I’d expect.

On the plugin docs page it says there’s a collection option but no info on what value should go there. I’m assuming the MBID of the collection, but that’s just a guess. Regardless, no matter what I put in that option beets is trying to update a different collection and failing with an HTTP 400 error. I don’t know how to get the log to see why exactly. It also doesn’t explain what the remove option should have as a value. Here’s the relevant section of my config:

musicbrainz:
    user: myuser
    pass: 'redacted'
    auto: yes
    collection: mbid_of_collection
    remove: what_goes_here

And here’s what happens when I try to run the mbupdate command:

$ beet -vv mbupdate
user configuration: /config/config.yaml
data directory: /config
plugin paths:
Sending event: pluginload
ImageMagick version check failed: [Errno 2] No such file or directory: 'magick'
ImageMagick version check failed: [Errno 2] No such file or directory: 'convert'
artresizer: method is (1, (0,))
inline: adding item field multidisc
inline: adding item field disc_has_subtitle
library database: /config/musiclibrary.blb
library directory: /shared/Lossless Music
Sending event: library_opened
mbcollection: Updating MusicBrainz collection a_different_collection_mbid...
error: MusicBrainz API error: caused by: HTTP Error 400: Bad Request

Hello! Any chance you’re running into this bug?

I do think that should be a collection MBID in the config, yes.

Hi adrian, thanks for your answer. It made me realise the problem is my config! I didn’t read the mbcollection docs closely enough and put all options under musicbrainz: when only user and pass should be. Since my collection option wasn’t in the mbcollection: section it was trying to add releases to the wrong collection type, just as the bug report says.

After fixing this it’s working as expected.

That’d do it!! I suppose it would be nice if the error message were more helpful, but I’m glad you figured it out.

1 Like