beets icon indicating copy to clipboard operation
beets copied to clipboard

Let mbsubmit plugin open seeded "add release" page

Open Profpatsch opened this issue 9 years ago • 14 comments

When packaging I found mbsubmit, but I can’t figure out how to access it’s functionality from the command line.

Profpatsch avatar Feb 04 '16 17:02 Profpatsch

There's actually no CLI interface to the plugin. Basically, all it does is:

$ beet ls -f '$track. $title - $artist ($length)'

except as an option at the importer prompts.

sampsyo avatar Feb 04 '16 18:02 sampsyo

I see. The code states that it cannot submit to Musicbrainz. Picard actually has a plugin that can do that, via a generated HTML form and a post request (that’s kind of hacky, alright, but it works :) ).

Profpatsch avatar Feb 04 '16 21:02 Profpatsch

So the workflow is:

  1. enable the plugin
  2. use “as is”
  3. copy the output strings into musicbrainz?
  4. update tags after some time?

Update: Hm, that didn’t work.

Profpatsch avatar Feb 04 '16 21:02 Profpatsch

Whoa; crazy. Maybe we should steal that feature. :smiley:

Yes, that's approximately my understanding. It might be worth getting feedback from @awesomer and @diego-plan9, who are more familiar with the plugin (@diego-plan9 wrote it :smiley:).

sampsyo avatar Feb 04 '16 21:02 sampsyo

Hm, the question is how the workflow should look;

My idea:

  1. The release doesn’t exist, so I hit use as-is
  2. After the import I filter out all albums without a musicbrainz ID
  3. I use beet mbsubmit <album filter> to submit the data; it opens a window in the browser with known tags already filled in (care has to be taken that only whole albums can be submitted, also ones with multiple mediums)
  • If use as-is imports everything in the folder (which it should imho) mbsubmit could also submit the album cover somehow
  • Problem I had: beet mbsync skips releases without mbid instead of trying to fetch the correct release

For reference, here is the Picard plugin that does something similar: https://github.com/musicbrainz/picard/blob/master/contrib/plugins/addrelease.py

Profpatsch avatar Feb 04 '16 22:02 Profpatsch

The workflow for the current mbsubmit plugin is :

  1. try to import the release
  2. it doesn't exist, so hit "[P]" for print tracklist
  3. add the release to musicbrainz, including using the tracklist durations if you can't get them via a musicbrainz importer (https://github.com/murdos/musicbrainz-userscripts)
  4. hit "[I]" and input the MBID of the release you just added

The whole point of mbsubmit is to prevent you from having to import the files "As Is" in order to "print" their tracklist.

awesomer avatar Feb 04 '16 23:02 awesomer

Oops; sorry for misunderstanding your comment, @Profpatsch. Yes, that sounds like a good plan.

FWIW, the fetchart plugin should still work, so album art will stay associated with the imported album. So the plugin could indeed send his to CAA.

sampsyo avatar Feb 05 '16 01:02 sampsyo

Thanks for "discovering" the picard auto-magically-upload feature, @Profpatsch ! It's a rather neat idea, and if we can assume that the MusicBrainz UI does not change too much and it does not go against MusicBrainz policies (which I'm assuming won't be a problem since it's included in picard?), I feel it would be worth "stealing" it indeed!

As for the current usage of the plugin, it's basically as described by @awesomer at https://github.com/beetbox/beets/issues/1866#issuecomment-180101225 (please let me know if the existing documentation did not make a good job for explaining it, as it might as well be the case).

It seems that if we manage to bring in the feature from picard, we would only need to change step 2 (so instead of printing it performs the actual submission) - would that suit your needs? I'm mainly curious about if the third step on your proposed workflow (the separate beet mbsubmit <album filter>) fits a particular scenario (on a side note, implementing that command looks fairly straightforward - it would basically be a shortcut for https://github.com/beetbox/beets/issues/1866#issuecomment-179997939).

diego-plan9 avatar Feb 05 '16 14:02 diego-plan9

please let me know if the existing documentation did not make a good job for explaining it, as it might as well be the case

Oho, I didn’t know about that. Probably because I did a lazy search for mbsubmit on the plugin doc page and then went ahead to decipher the source code. Thanks @awesomer for the description even though I missed the documentation.

It seems that if we manage to bring in the feature from picard, we would only need to change step 2 (so instead of printing it performs the actual submission) - would that suit your needs?

Yes, that would be perfect. Then we could call the option submit to musicbrainz and it would be really obvious.

I'm mainly curious about if the third step on your proposed workflow (the separate beet mbsubmit ) fits a particular scenario

Not sure if that is required then. Maybe it’s best to keep the amount of command line subcommands to an absolute minimum.

Profpatsch avatar Feb 05 '16 15:02 Profpatsch

Gotcha, thanks for sharing your thoughts on the workflow!

I'm actually quite tempted to work on bringing the form-based musicbrainz submitting to beets, as it will greatly enhance the usefulness of the mbsubmit plugin. However, I do have a couple of items on my beets-agenda I'd love to tackle before doing so, so it might take some time (hopefully measured in weeks and easily counted on the fingers of one hand!).

diego-plan9 avatar Feb 08 '16 11:02 diego-plan9

@diego-plan9 Great!

Profpatsch avatar Feb 08 '16 12:02 Profpatsch

Hey all :), For reference, here's picard's "Add Cluster As Release" plugin implementation of this feature:

https://github.com/metabrainz/picard-plugins/blob/2.0/plugins/addrelease/addrelease.py

Source: https://community.metabrainz.org/t/a-way-to-batch-import-data/327361/

doronbehar avatar Mar 15 '20 09:03 doronbehar

Hey all.

In #4807 I added a rather simple addition to mbsubmit plugin that enables you to execute picard with the paths of unmatched files as arguments. This makes it much easier to open the musicbrainz website with most of the data already available in the editing webpage. Your review is welcome.

doronbehar avatar May 30 '23 11:05 doronbehar

I wasn't aware there's an issue for this, PR here https://github.com/beetbox/beets/pull/5300

jonaswinkler avatar Jun 16 '24 18:06 jonaswinkler