Skip to content

Fix/spotify api feb 2026#170

Open
mrkkr wants to merge 3 commits into
spotify2tidal:mainfrom
mrkkr:fix/spotify-api-feb-2026
Open

Fix/spotify api feb 2026#170
mrkkr wants to merge 3 commits into
spotify2tidal:mainfrom
mrkkr:fix/spotify-api-feb-2026

Conversation

@mrkkr
Copy link
Copy Markdown

@mrkkr mrkkr commented Feb 22, 2026

Summary

Updated spotify_to_tidal to be compatible with Spotify Web API changes from February 2026.

Changes Made:

1. API Endpoint Migration (src/spotify_to_tidal/sync.py)

  • Old: GET /playlists/{id}/tracks (deprecated)
  • New: GET /playlists/{id}/items (new endpoint)
  • Replaced spotipy.playlist_items() calls with direct HTTP requests using the new endpoint
  • Added proper Bearer token authentication for API requests

2. Removed Deprecated Fields (src/spotify_to_tidal/sync.py)

  • Removed external_ids(isrc) from query fields (no longer available in API response)
  • Updated isrc_match() function to handle missing ISRC data
  • Simplified field selection to: name, album.name, artists, track_number, duration_ms, id

3. Type Definitions Update (src/spotify_to_tidal/type/spotify.py)

  • Marked removed fields as Optional: available_markets, external_ids, linked_from, popularity, followers, genres

4. Error Handling Improvements (src/spotify_to_tidal/sync.py)

  • Added null-check filtering for API responses that may contain None items
  • Added graceful handling for playlists without accessible items
  • Improved retry logic for authentication failures

Testing

  • Verified compatibility with new /playlists/{id}/items endpoint
  • Successfully synced multiple playlists between Spotify and Tidal

beberry and others added 3 commits February 16, 2026 23:34
- Use playlist_items instead of playlist_tracks, rename 'track' key to 'item'
- Refactor _fetch_all_from_spotify_in_chunks to return raw pages, letting
  callers handle their own response parsing
- Extract _get_tracks_from_spotify_favorites as standalone function
- Make isrc_match handle missing external_ids gracefully
- Add unit tests for pagination, playlist fetching, and favorites fetching
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.

2 participants