0

I am doing the ISRC lookup for eg.

https://musicbrainz.org/ws/2/isrc/SEUM71401533?inc=releases

In the response I get list of releases. Now how do I filter the one official release. There are many official releases. I just want to get the cover art but many times its difficult to get the correct release id out of the many releases.

If I take this request for example :

https://musicbrainz.org/ws/2/isrc/SEUM71401533?inc=releases

In the response the release with the id "1c70f755-8622-41f5-8f69-9c0e8cc082ce" gives the correct album art(which is the fourth release in the response) from the covert art api doing the following request :

https://coverartarchive.org/release/1c70f755-8622-41f5-8f69-9c0e8cc082ce

So can I figure out which release id to choose programmatically so that I get the correct cover art

nick.tdr
  • 4,627
  • 4
  • 28
  • 41

1 Answers1

1

We can assume that the first release to be the official one so we can just get the first release in the response and then use its id to get the cover art.

If there are multiple recordings we will have to get the first release across all the recordings. I am using kotlin so "min" function for arrays comes handy.

Doing this gives me correct cover art most of the times.

nick.tdr
  • 4,627
  • 4
  • 28
  • 41
  • 1
    I'm pretty sure you can't assume that the first one is _the_ official one, as each result may contain several official releases (or no official releases!). – Freso May 12 '18 at 03:11
  • I know but still its giving me better results. Not perfect but still. If you have any other way to figure out how to get the release id that I should use to get the cover art please let me know – nick.tdr May 12 '18 at 03:14
  • I'm in the same boat on this. Using a php class specifically for MusicBrainz queries, I am able to sort the array of releases returned and grab the earliest release year, however I question if I should be going through the release-groups instead, and then finding the recording within that release-group to get the correct recording and release? – Scott Fleming Jun 28 '19 at 03:42