MPD icon indicating copy to clipboard operation
MPD copied to clipboard

CD Audio Tags from Musicbrainz (working fork)

Open tinoucas opened this issue 6 months ago • 4 comments

Feature request (not really)

I forked MPD and implemented cd audio tags from Musicbrainz.

tinoucas/MPD

I have no clue how pull requests work, and/or if I need to cleanup my code before hand.

Anyway here's what works: I got inspiration from Qobuz remote tags, but had to hook the RemoteTagCache system to disable it for this. With RemoteTagCache, cdda:///1 tags (for example) remain the same, regardless of other cd insertions. So the system caches the cd's tags in its class, locally, until the cd changes (and thus the cd musicbrainz id). I copied code from cd-discid to help me generate the musicbrainz id (it does not spin the cd drive for that). I used curl to fetch the info from musicbrainz. And upnp's ixml to parse the XML received.

Let me know if you're interested or not, and what I have to do moving forward

tinoucas avatar May 08 '25 15:05 tinoucas

I have no idea what this feature means. If you want to get it merged, send a pull request (with a promise to keep maintaining it and handling bug reports), but be sure to submit a branch with proper commits. From a first glance, your branch looks quite messy, in serious need of cleanup. Code-wise, you should not be using the upnp ixml library, or else your feature will not work without upnp support - that makes no sense. MPD currently uses expat to parse XML - consider migrating to that one. Pull requests on GitHub are easy - click on "Pull requests" at the top, then on "New pull request". I'm sure you'll figure out the rest.

MaxKellermann avatar May 08 '25 17:05 MaxKellermann

I guess I wasn't clear about the added feature.

Currently when you play an audio CD in MPD (through cd paranoia, by adding cdda:///x tracks), they are added with no tags. With this work I've done, the CD id in Musicbrainz' API format is generated and the CD's tags are fetched from the Musicbrainz server.

I'll get back to it this week-end, by creating a new branch and porting what I've done while cleaning it up. I'll also make the change from upnp to expat for XML. To be honest I used the first library I found in MPD for this and completelly missed the correct one. If all goes well, I'll issue a pull request.

tinoucas avatar May 08 '25 18:05 tinoucas

That sounds like a useful feature.

MaxKellermann avatar May 08 '25 21:05 MaxKellermann

Since you have closed your own PR https://github.com/MusicPlayerDaemon/MPD/pull/2301 I assume you have lost interest in the feature, therefore closing this feature request as well.

MaxKellermann avatar Jun 30 '25 08:06 MaxKellermann