musicbrainz: Support extra_tag discogs_catalog - #4321
Conversation
- Files might contain a tag named `discogs_catalog` that could be used as the value of the `catno` field when searching for matches on MusicBrainz. - Support configuration via adding to musicbrainz.extra_tags list in beets config.yaml. - Requires the tag `discogs_catalog` to be readable. It's to be decided if by supporting it via the beets' `add_media_file()` method or adding to the mediafile library is the proper approach here.
|
To test, add this field to mediafile: It's to be decided if it makes sense to support discogs_catalog by mediafile directly or via the add_media_field() method in beets. This is part of the config in use: Metadata of an already quite properly tagged file (using mp3tag + discogs sources definition a couple of years ago): Snippets of a beets import log of this file: |
| # Discogs Catalog number. | ||
| if likelies['discogs_catalog'] and album_info.catalognum: | ||
| dist.add_string('catalognum', likelies['discogs_catalog'], | ||
| album_info.catalognum) | ||
|
|
There was a problem hiding this comment.
I am not yet sure if what I'm and doing here is correct at all and would need advice from @wisp3rwind or @sampsyo. Do I overwrite something here? We use album_info.catalognum in the block before when handling the regular catalognum field.
I am also not yet sure what should happen when both discogs_catalog and catalognum tags exist on a file to be imported. Which one should be used for the mb-search-field catno then? Maybe it should be configurable which one should be taken if both exist?
|
Some more details on the mp3tag "Discogs web sources file":
|
|
Hmm; interesting! Just so I understand it, however, is it the case that an on-disk If so, maybe we should just change MediaFile itself to "ingest" |
Sure, a catalog number is a catalog number, no matter where it's pulled from. My main goal for this change was to make use of a valuable information when importing already quite well tagged files. It should also lead to getting better distance scores and thus potentially getting closer to auto-tagging those files. Not sure if everything I coded there is entirely correct towards achieving these goals... When the file is imported the on-disc discogs_catalog tag is of no use anymore because catalognum is there and is more of a standard field. What I am not sure now is what happens with the abandoned on-disk tag. Beets doesn't know about it anymore. But am I right that this is the case with other tags as well? Beets can't know everything right?
I am not sure if I understand what you mean by ingest but I guess something like: MediaFile should be aware of that both, a discogs_catalog and also a catalognum tag could exist and should pass one or the other when the catalognum attr of the MediaFile object is accessed? But what now if both tags exist on-disk, which one should then be used for passing to the MB search? |
|
Sure! To break this down, what I was proposing is that MediaFile not add a new field, but make the existing "logical" That way, beets would be blissfully unaware and would get the data from whatever field existed. If both were defined, MediaFile would need to pick a winner (presumably the current tag mapping). |
|
That sounds like a great solution. Aha, read only true would be what discogs_catalog on-disk should be. I'll try this soon. Thanks! |
|
Closing in favor of a solution, as suggested in mediafile diretly: beetbox/mediafile#61 |
Description
discogs_catalogwhen pulling metadata from Discogs.https://github.com/search?q=discogs_catalog&type=code
To Do