Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide pre-import means of printing file tags in mb release editor tracklist format #1689

Closed
awesomer opened this issue Nov 3, 2015 · 10 comments
Labels
feature features we would like to implement

Comments

@awesomer
Copy link
Contributor

awesomer commented Nov 3, 2015

Feature request.

Beets could be enhanced to make it easier to add the tracklists of new releases to musicbrainz. Currently one has to import the release with tags as is, and then re-tag.

https://gist.github.com/DjSlash/3313266de1b696667725#file-config-yaml-L65

Has an example of how DjSlash created a "nicelength" such that one can print a tracklist in this format. This would be especially handy when importing durations of one's vinyl recordings.

Import workflow would be :

  1. try to import release, not found in MB
  2. [P]rint the tracklist
  3. Use this tracklist to add the release to MB
  4. Use the [I]d to import
@sampsyo sampsyo added the feature features we would like to implement label Nov 3, 2015
@sampsyo
Copy link
Member

sampsyo commented Nov 3, 2015

Seems like a good way to contribute back to MB.

Forgive my ignorance, but what does the preferred track list format look like? Does it get pasted into somewhere? And is there something special about how the lengths need to be formatted?

@awesomer
Copy link
Contributor Author

awesomer commented Nov 7, 2015

Example :

  1. R U Scared - Tripmastaz (7:08)
  2. Komatoze - Tripmastaz (7:49)
  3. Oren's Sklyanka - Tripmastaz (9:04)
  4. Komatoze (dub version) - Tripmastaz (8:01)

http://musicbrainz.org/release/69624900-feeb-4d91-8d98-b75c5a808704

One pastes it into the "track parser" on the "tracklist" page of the musicbrainz release editor.

@sampsyo
Copy link
Member

sampsyo commented Nov 7, 2015

Got it. Looks like this (old) wiki page describes the track parser you're using, right?

A good first step, should anyone choose to accept it, would be to extend the info plugin so it can be configured to output using formatting, like the list command. At the same time, it would be a good idea to format length as a time by default—nobody probably wants to see a raw number of seconds.

@diego-plan9
Copy link
Member

Now that custom formatting for the info plugin is in place, I'm wondering if you could provide a bit more info on the preferred way to take on the next steps (provided the "human length" issue is eventually implemented for the whole package as discussed on #1737, which I still feel a bit daunted by it).

As far as I can see, steps 2 and 3 on the original flow proposed by @awesomer seem to call for adding a plugin listener in the proper place (as-is choice or music brainz query with empty results), but I'm not sure if it would be a good idea to add that functionality to the info plugin - seems a bit out of place. At the same time, I'm not sure if coming up with a new plugin just for this case is desired: perhaps adding it to an existing plugin would be a sane choice? Would another completely different approach be preferred?

On a (very marginal) side note, I'm wondering if it might be a good idea to come up with a system (in case it is not already in place or already discussed) to allow plugins to modify the options presented to the user during ui.commands.choose_candidate() and others? The rationale would be to streamline and standardize a bit those plugins that have extra prompts (this one and the upcoming editor comes to mind), hopefully saving the user some mental effort and maybe also playing nicer with the upcoming big interface revamp.

@sampsyo
Copy link
Member

sampsyo commented Dec 1, 2015

I concur with all your observations! Namely:

  • The proposed importer option doesn't belong in the info plugin.
  • A new plugin would be pretty small. On the other hand, it could be a good starting point for other functionality for submitting to MusicBrainz! For example, if an API or other workaround ever appears for direct programmatic adding of releases, it could live there too. Suggested names: mbsubmit, mbexport
  • Yes, a general hook for adding importer prompt options is in order. Let's invent a new event for that.

@awesomer
Copy link
Contributor Author

awesomer commented Jan 3, 2016

I have used the recently merged version. I have "mbsubmit" in my plugins, and I've seen the [P]rint and sKip options and used them successfully.

However, I am trying to get them to always display, and have :

mbsubmit:
    threshold: none

In my config.yaml, which according to the documentation should remove any threshold for match quality to check for displaying these options. I then re-import the release I want to import durations for, and I do not see these options displayed.

Am I misunderstanding the threshold option? My use case is wanting to add durations to musicbrainz vinyl rip tracklists by printing their beets duration.

Edit : sigh, of course immediately after typing this out I decided to try "strong" and it worked as expected. I guess I didn't understand why one would want to have the plugin enabled but not ever displays these options? Shouldn't one just disable the plugin if one doesn't want the options displayed?

Edit 2:

I also have this problem with the default path format :

  1. Ride My Junk (Squarehead mix) - Waze & Odyssey (6:37)
  2. Ride My Junk (Chamboche remix) - Waze & Odyssey (7:48)

vs. existing mb tracklist :

A. Ride My Junk (Squarehead mix) - Waze & Odyssey (?:??)
B. Ride My Junk (Chamboche remix) - Waze & Odyssey (?:??)

I looked at the path formats and didn't see any variation of "track" that seemed likely to print "A." and "B."? Any ideas?

@diego-plan9
Copy link
Member

Thanks for trying it out and for the feedback!

Edit : sigh, of course immediately after typing this out I decided to try "strong" and it worked as expected. I guess I didn't understand why one would want to have the plugin enabled but not ever displays these options? Shouldn't one just disable the plugin if one doesn't want the options displayed?

Glad you have been able to sort it out - as you probably inferred, treshold: none means "only show the print tracks option if the recommendation is none or below", which in practice only shows the choice for albums where no suitable match at all is found. Using strong (and ideally in combination with the autotagger timid mode) is indeed the way to go if you want it to always be shown, regardless of how strong the recommendation is.

As for the rationale, the main idea was to avoid "polluting" the prompt as discussed at #1779 (comment), as I personally felt the most common case was that the user would only use it for a handful of albums (the ones that do not have a proper MB match) during an import session, and if other plugins start adding choices to the prompt it might get a bit out of hand quickly. I'd gladly revise the decision if there is a consensus on it, as it was mainly a personal opinion and prediction!

I looked at the path formats and didn't see any variation of "track" that seemed likely to print "A." and "B."? Any ideas?

Hmm, the way the plugin works is that it simply prints the information found on the mediafiles (ie. it uses the tags on the files to be imported, not using the information retrieved from MusicBrainz at all) - $track will as a result print whatever value the file has on that tag.

This implies that unless the files do actually have "A1", "B", etc on their track number tag (which I'm actually not sure if it is a valid value for most of the formats - they might be forced to be numeric), the plugin currently has no way of knowing how to map the numbers to the vinyl naming, and it makes no effort to do so as it "assumes" that the mediafile tags are right and accurate.

Unfortunately I can't think of a solid and reliable way of working around this issue, but if a solution is found I'd be happy to work on it.

@awesomer
Copy link
Contributor Author

awesomer commented Jan 6, 2016

That makes perfect sense. For now I'll just fix the track names on durationless vinyl rips manually. I do plan to file an issue regarding support of non-numeric tracknames, for the containers that support it. :D

@awesomer
Copy link
Contributor Author

@diego-plan9 : fyi, I have filed #1831 for support of non-numeric track identifiers. :D

@sampsyo
Copy link
Member

sampsyo commented Jan 26, 2016

Closing this ticket, since mbsubmit implements the core idea now.

@sampsyo sampsyo closed this as completed Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

3 participants