Skip to content

Conversation

@sages-d
Copy link

@sages-d sages-d commented Aug 24, 2025

Hi, I tinkered with this a few months back then got busy and forgot about it. I've found that this helps a bit with some foreign language tracks in playlists that have different titles between Spotify and Tidal.
Also seems to match a fair amount faster, hopefully it's a worthy contribution.

Changes

  • Add matching track by ISRC
  • ISRC matches are first priority
  • Bumped tidal api version to 0.8.0

Have tested on a few different playlists of varying sizes (50 - 2700 songs).

Resolves #37

@iniw
Copy link

iniw commented Aug 25, 2025

Got this error when trying this out:

  File "~/code/spotify_to_tidal/src/spotify_to_tidal/sync.py", line 104, in _search_for_isrc_track
    for track in tidal_session.get_tracks_by_isrc(spotify_track["external_ids"]["isrc"]):
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/code/spotify_to_tidal/.venv/lib/python3.13/site-packages/tidalapi/session.py", line 910, in get_tracks_by_isrc
    raise ObjectNotFound
tidalapi.exceptions.ObjectNotFound

Seems like spotify's response structure changed? Or perhaps that field is not guaranteed to be present.

@sages-d
Copy link
Author

sages-d commented Aug 26, 2025

Interesting, I haven't been able to replicate that but will keep testing to see what I can sort out.
Thanks!

28 Aug 2025 - newer versions of tidalapi throw that ObjectNotFound when trying to match by ISRC, added handling :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use new tidal API endpoint get-tracks-by-isrc

2 participants