Fetching ISRCs from Spotify

Back working great!!! Thanks for the quick fix.

2 Likes

As of this morning, when matching to a release in MB it will fetch the existing ISRCs in MB, and highlight when they match what Spotify has for that track and when they don’t.

This should hopefully be a useful warning when you might be about to add ISRCs to the wrong version of an album, or when one of its recordings is incorrectly mapped/merged in MB.

This happens through an Ajax call to distribute the load and reduce the instance of rate limiting so you won’t actually see it on page load. When the job is done you’ll either see a series of ISRCs or “None”. A blank box means the job is still in progress. Albums of even 15 tracks often trigger rate limiting so it can take a while.

4 Likes

It sounds fascinating but I don’t know your tool.
Could you share little instructions and a URL where I can go to see when it matches and another URL where I can go to see when it does not? :slight_smile:

As of today, the submit button doesn’t seem to be working anymore. Like the new changes too.

This is an example where some recordings match, and others do not

2 Likes

Broke that part of the JS by accident – didn’t notice since it’s difficult to test cause I need a release that doesn’t have ISRCs to be sure it went through.

Done a rollback now, but you’ll probably need to manually force the browser to clear the cached copy for it to resolve itself.

3 Likes

Working! Great! Thanks.

A delimiter when multiple ISRC are present would increase legibility. :slight_smile:
https://tatsumo.pythonanywhere.com/album/1zj1tn6yjZangQpuQHjJA3?bind=5e39ef0a-88c2-4f9e-9be6-910c6339486e

com_album_1zj1tn6yjZangQpuQHjJA3_bind%3D5e39ef0a-88c2-4f9e-9be6-910c6339486e

4 Likes

I got bored of copying and pasting the Spotify and MB URLs so I wrote a little userscript that adds a link to the release page to take you directly to the submission screen:

import-isrcs

Here’s a link to the userscript:

mb_spotify_isrc_link.user.js

It’s only been tested in Violentmonkey on Firefox, so if you run into any issues with different browsers or extensions then let me know and I’ll do my best to fix them.

9 Likes

Modified it to make the generated URLs a tad shorter:
Line 25

let mbid = window.location.href.replace(/^https?:\/\/(?:beta\.)?musicbrainz\.org\/release\/([0-9A-Za-z\-]{36}).*/, "$1");

Line 27

let tatsumoUrl = `https://tatsumo.pythonanywhere.com/album/${spotifyId}?bind=${mbid}`;
2 Likes

Thanks, works well in Tampermonkey for Edge.

1 Like

That’s very cool. I had been thinking of doing it in reverse (i.e. you could paste an MBID and it would auto lookup both) but this is definitely the more convenient way to do it.

One other thing I was thinking of doing was dynamically changing the client identifier to include the source Spotify URI. So it would be something like “spotify-isrc-4L1bv7iytOvlAzqBXz9raH” since this would hack around the limitation of not being able to include an edit note automatically. I can’t see any problems with doing this, but I was wondering if anyone else can.

1 Like


2 Likes

Thanks for the suggestion! I’ve just pushed a commit with a very slightly modified version of your regex.

The version number has been bumped so you should be able to update the script via the UI (at least in Tampermonkey).

2 Likes

Hi @tatsumo,

Do you think it’d be possible to integrate Deezer to your wonderful Spotify tool?
https://developers.deezer.com/api/

I’m especially interested in release country info which seems to be returned by the API (https://developers.deezer.com/api/infos).

4 Likes

The release country in Deezer is no different to the licenced countries for a release available from Spotify.

I can do this, yes. As I think I said above, I initially started with the Deezer API, because it doesn’t require OAuth if you’re just accessing the public catalogue. However, I don’t want to do this unless there’s a good use case.

Can you give me an example of what you want to do that you can’t get from Spotify?

1 Like

Also, as requested before, I’ve exposed the release date that Spotify has in its catalogue. But please please use it with caution.

An example of where it isn’t trustworth, is ARTPOP by Lady Gaga, where it has the barcode/catalogue number (0)0602577441974. This was the version issued this year which removed Do What U Want from the tracklist entirely (initially the licence was simply withdrawn making it unstreamable but still listed in the tracklist).

Even though this edition is clearly new (the older versions can still be found in Spotify with a direct link, but have no licensed territories), true to the motive of erasing history, it has a release date in 2013.

5 Likes

I found a release date on there that was 2 years before the original CD was even available, so yeah, it can definitely be wrong. However, I love that you added that. New changes look great.

3 Likes

@tatsumo This an awesome work you’ve pulled off, I have one question, do you think in the near future can you have the writers credits?

The Spotify API doesn’t tell you writers credits unfortunately.