beets
beets copied to clipboard
Fetch `remixer` field from MusicBrainz
Problem
Musicbrainz seems to have a field called remixer
for remixes, this info isn't written to my files.
Example: https://musicbrainz.org/release/7c7f7ddf-c021-4ee8-993d-d1c330b4a36a
Using it for the artist field, similarly to the artist_credit
option would also be nice.
According to the Picard docs there would even be a proper place to store it in ID3.
Setup
- OS: Arch Linux
- Python version: 3.10
- beets version: 1.6.0
- Turning off plugins made problem go away (yes/no): no
Sounds like a reasonable thing to add! Hopefully it shouldn't be too hard (the place to do it is in beets/autotag/mb.py
).
I am currently working on this. It is my first time contributing to beets so I might take some time to get familiar with the codebase and structure.
Awesome! Let us know with a Discussion post if you have any code-level questions we can answer.
So after looking at the example given by @TypicalFence I can see the remixer field on the musicbrainz website. However, looking at the JSON or XML that is available from the muiscbrainz website I can't find the remixer mentioned anywhere except for the title. I don't know how to proceed since to me it seems like this information isn't available through the api queries beets makes at the moment. Is this the case or am i missing something?
@Bootjewolf I just went over the musicbrainz api docs.
The remixer tag is a artist relation.
When we include artist-rels
in a request of a recording from the album we get the following: JSON, which includes a relation of the type remixer
. :tada:
Now for that to work for the requests that you posted we need to include recording-level-rels
, which just tells musicbrainz to resolve the rels on a recording (track/song) level.
This leaves us with the following url: https://musicbrainz.org/ws/2/release/7c7f7ddf-c021-4ee8-993d-d1c330b4a36a?inc=aliases%2Bartist-credits%2Blabels%2Bdiscids%2Brecordings%2Bartist-rels%2Brecording-level-rels&fmt=json
You can find this in the api docs here.
The api is rather complicated tbh.
Thank you! I will have another look at it this coming week.
According to my tests I have successfully implemented it in PR #4549.