beets
beets copied to clipboard
Let mbsubmit plugin open seeded "add release" page
When packaging I found mbsubmit, but I can’t figure out how to access it’s functionality from the command line.
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.
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 :) ).
So the workflow is:
- enable the plugin
- use “as is”
- copy the output strings into musicbrainz?
- update tags after some time?
Update: Hm, that didn’t work.
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:).
Hm, the question is how the workflow should look;
My idea:
- The release doesn’t exist, so I hit
use as-is - After the import I filter out all albums without a musicbrainz ID
- 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-isimports everything in the folder (which it should imho) mbsubmit could also submit the album cover somehow - Problem I had:
beet mbsyncskips 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
The workflow for the current mbsubmit plugin is :
- try to import the release
- it doesn't exist, so hit "[P]" for print tracklist
- 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)
- 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.
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.
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).
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.
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 Great!
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/
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.
I wasn't aware there's an issue for this, PR here https://github.com/beetbox/beets/pull/5300