Fetching ISRCs from Spotify

MBS project, Editing Interface component, IMO.

@reosarevok Done: MBS-9881.

2 Likes

That’s not correct.

It shows all mediums for a given release, but it shows only as many tracks as the Spotify release has – the idea isn’t to show all the information in one place, it’s to create the edit for you, so where the Spotify release has 4 tracks, but the MB one has 9, there’s no point showing any more than 4, because it’s only able to create an edit for those 4.

Combining Spotify releases in this way is doable as though they’re one big release but non-trivial for various reasons, and also would increase the chance of bad edits. This is a case of “no plan to fix” for now, particularly because it’s an edge case and not quite in keeping with the goal of the tool – if Spotify considers two discs to be separate releases, then technically it’s no longer a 1-to-1 with the one in MB, which is all this really tries to help with.

Moreover, in this instance, I don’t see why you wouldn’t just do it by adding the two separate parts as releases on MB first – they have both been assigned separate UPCs for the digital versions, ergo they have been released as separate entities.

If this script is clever enough to do all the lookups to grab all these ISRCs from Spotify, why does it not also ask the user to type in one line of comment to put into the edit. OR start with a default comment of “Uploaded by the Tatsumo Spotify IRSC tool”. It then lets me know what I am seeing on my subscribed edits.

Because the server doesn’t support this, as is already mentioned above.

Sorry - haven’t been following the whole thread. Using Scripts is in my “ToDo” list, so I have not yet read up or fully understand them yet.

You’re right of course. I wasn’t paying enough attention to that. The separate relesases have been added now.

Does anyone know if the UPCs that Spotify reports are unique to the digital releases, or are they shared with the corresponding physical releases (if existing)? I think they are unique, but I want to be certain.

This is related to edit #57143089.

As a general rule, they are unique to the digital release. I vaguely recall possibly once having seen a UPC returned by Spotify that matched the CD, but I believe major labels do not generally reuse the same UPC for digital and physical releases: otherwise digital-only releases would never have UPCs (which they usually do).

It’s not very common but on some releases cd/digital releases have the same upc.

on the cd release back art you can see the upc.
the digital release has the same upc.
confirmed by itunes lookup.

https://itunes.apple.com/lookup?upc=5060006348129

3 Likes

Is there anyway to add release date? It would be helpful as that is the only reason I still have to go to the Spotify API if it’s a different barcode, etc. than other sites.

I’ve only been able to pull the year from @tatsumo’s tool. I don’t know that the Spotify API always has the full date available. See the release_date property of the album object:

release_date string The date the album was first released, for example 1981 . Depending on the precision, it might be shown as 1981-12 or 1981-12-15 .

On the other hand, if you have the UPC already, (which I’ve been pulling from Spotify), you might have luck pulling the release date from the iTunes API, as mentioned by @a23bed above. Using bash:

curl -s https://itunes.apple.com/lookup?upc=${UPC} | jq

Which gives a nicely formatted JSON object that (in my experience) has the full release date. Or try:

curl -s https://itunes.apple.com/lookup?upc=${UPC} |
        jq -c '.results[0].releaseDate'

If you want just the date to be returned. ${UPC} would be the UPC of course.

I know how to use the Spotify API to find the dates, I was just making a suggestion for this awesome utility.

Please don’t add release dates based on Spotify’s data alone. See my comment elsewhere:

6 Likes

Oh, yeah, totally agree with that.

Hi @tatsumo.
Could you add some nice column headers to your table because we were wondering what some columns they mean, lately in this edit:thinking:

Spotify track title Spotify ISRC MusicBrainz recording Whatnot
Bla bla FRSD112345 Bli Blu 2.099

Isn’t that the amount of seconds it conflicted with the length of the track in the release on MB?

1 Like

Yeah that’s coming very soon. Just been on holidays for a while.

2 Likes

Trying to input the ISRC from this album https://tatsumo.pythonanywhere.com/album/5Eh4g0AuSoFT5xc0vOG324 will display the following error message.

ISRCs must be in valid ISRC format
For usage, please see: MusicBrainz API - MusicBrainz

I’m guessing because the ISRC format used for the tracks have hyphens, e.g. GB-SMU-23-99532

1 Like

When entering enter them without the hyphens. Those were just added for readability.

1 Like