# Get the ISRC code to check for duplicate tracks that will be substituted automatically by Spotify if the submitted version isn't available in a jurisdiction
isrc = track.asbuiltin()['external_ids']['isrc']
# Now check for those additional versions, and append them to the available_markets array. I might be doing this in a reasonable way now?
+# Not necessarily good enough, though! Lets check each of our preferred markets, sadly using a new API call for each (hence just a manual list for now) and seeing if there's any redirects
+# Further reading: https://developer.spotify.com/documentation/general/guides/track-relinking-guide/
+markets = ['AU', 'CA', 'IE', 'NL', 'NZ', 'US']
+for m in markets:
+ local_track = spotify.track(track_id, m)
+ if local_track.asbuiltin()['is_playable'] is True: