My problem is similar to API endpoint for track, except I’m doing work with Plex, rather than Jellyfin.
My current solution is to do a query such as this: https://musicbrainz.org/ws/2/release?track=11f574a4-8a10-4cc4-a82d-ec0b39098a3a&fmt=json
With that query, I’m able to give it a track ID and it will return a release with all the tracks and their associated recordings. In theory, I could loop through all the tracks and find the ID that matches the one I queried for. This works most of the time.
The problem is, the ID I give it (11f574a4-8a10-4cc4-a82d-ec0b39098a3a
), has been merged into 049e188c-25ad-4777-ae7c-67a3cd472b7b
. Both of these IDs represent the track “Casual”, but there is no easy way to tell that the MBID I use in the query corresponds to the one that is returned.
I noticed that if I navigate to https://musicbrainz.org/track/11f574a4-8a10-4cc4-a82d-ec0b39098a3a, I am redirected to https://musicbrainz.org/release/5b774bdd-a553-4bd6-b9a0-acff0efe5bb5/disc/1#049e188c-25ad-4777-ae7c-67a3cd472b7b, which correctly and explicitly points to the updated MBID.
For development purposes and for being able to have a robust way to determine the track it corresponds to, I’m debating hitting that /track
endpoint and parsing out the URL it redirects to. I’m hoping there’s a better way.
I’m absolutely capable of iterating through all the tracks on that release and using something like the track title to find the correct track object within the response. I would prefer not to do that, as there should be a simple way to get the track data without resorting to metadata to try to guess the correct object within the response.
It would be a lot more convenient if I could do a query such as https://musicbrainz.org/ws/2/recording?track=11f574a4-8a10-4cc4-a82d-ec0b39098a3a&fmt=json, but that does not seem to be supported at this time.