beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.57k stars 1.8k forks source link

Implement "Create new release on musicbrainz" feature #5300

Open jonaswinkler opened 2 weeks ago

jonaswinkler commented 2 weeks ago

Description

Closes #1866.

Implement support to create new releases on musicbrainz from unmatched albums directly.

Screencast from 2024-06-12 23-37-41.webm

See https://github.com/beetbox/beets/discussions/5299.

  1. When the new option is chosen, the MB release editor is opened in the browser, with known metadata already filled in. The plugin must launch an internal web server to do that.
  2. When the release is saved / created on musicbrainz, musicbrainz redirects to the local web server, submitting the new release ID. beets proceeds to import the album with that ID, similar to what happens when an ID is provided manually. (That's not shown in the screen cast)

See documentation and comments for details.

If no unmatched album is available for testing, set configuration mbsubmit.threshold to 'strong' and run import with --timid to select the new option.

To Do

jonaswinkler commented 2 weeks ago

Hey @doronbehar, If you're around, have a look at this. Maybe I can remove the "Open with Picard" option now that this here is implemented?

jonaswinkler commented 2 weeks ago

Thanks for the PR! I've made a couple comments but I'll also note that a fair amount of the changes in this PR are fairly boilerplate HTTP webserver stuff. Have you considered using something like simple-http-server or another package to deal with this? It would reduce the number of lines in the PR and make it easier to change in the future.

I thought about not pulling int too many new dependencies. I can also use flask instead, since that's already used by a couple other plugins...?

Serene-Arc commented 2 weeks ago

I don't think many dependencies is an issue that is too pressing. If it makes the code easier to read and maintain, that wins out over another dependency in my book. If flask is used by other plugins though, by all means use it!

jonaswinkler commented 1 week ago

Thank you for the review! It's now much cleaner and shorter with flask.

doronbehar commented 1 week ago

Hey @doronbehar, If you're around, have a look at this. Maybe I can remove the "Open with Picard" option now that this here is implemented?

Hey! Personally I won't mind it getting removed, as I'd definitely use this functionality once it will land! It also makes sense to me from a general point of view to remove it, but that needs an approval from the maintainers of beets.

Thanks for working on this feature!