Skip to content

Adjust Spotify endpoints post deprecation notice#3303

Open
OzGav wants to merge 5 commits intodevfrom
fix-spotify
Open

Adjust Spotify endpoints post deprecation notice#3303
OzGav wants to merge 5 commits intodevfrom
fix-spotify

Conversation

@OzGav
Copy link
Copy Markdown
Contributor

@OzGav OzGav commented Mar 4, 2026

References:
https://developer.spotify.com/documentation/web-api/references/changes/february-2026
https://developer.spotify.com/documentation/web-api/tutorials/february-2026-migration-guide

Changes Made

  1. init.py
  • Added ProviderFeature.PLAYLIST_CREATE to supported features (was previously missing)
  1. provider.py — Library Operations
  • library_add(): Consolidated 6 separate endpoints into single PUT /me/library with Spotify URIs (spotify:track:xxx,spotify:album:xxx, etc.)
  • library_remove(): Consolidated 6 separate endpoints into single DELETE /me/library with Spotify URIs
  1. provider.py — Playlist Operations
  • get_playlist_tracks(): Changed response field from item["track"] to item["item"] for regular playlists (liked songs via me/tracks still uses item["track"]). Fixed cache duration typo (2600 → 3600 for actual 3 hours).
  • remove_playlist_tracks(): Changed request body key from tracks to items, response field from item["track"] to item["item"]
  • create_playlist(): Changed from POST /users/{id}/playlists to POST /me/playlists (no longer requires user ID lookup)
  1. provider.py — Search
  • Reduced page limit from 50 to 10 per API restrictions
  1. provider.py — Album Tracks
  • get_album_tracks(): Extended cache from default to 1 year (album track listings are immutable once released

@OzGav OzGav added the bugfix label Mar 4, 2026
@OzGav OzGav marked this pull request as draft March 4, 2026 05:37
@OzGav OzGav added this to the 2.9.0 milestone Mar 25, 2026
@delatt
Copy link
Copy Markdown

delatt commented Apr 9, 2026

Hi, thank you for all the work! I just wanted to let you know that I have hit the issue with Spotify renaming track to item and am unable to load my Playlists without fudging things. I know you said that you would keep this as a draft until the old API stops working but decided to comment here instead of creating a new issue.

@OzGav OzGav marked this pull request as ready for review April 11, 2026 15:57
@OzGav
Copy link
Copy Markdown
Contributor Author

OzGav commented Apr 14, 2026

Personally I don’t encounter any issues with Spotify at the moment.. Maybe the API changes are being done regionally? Even though everything is working fine with the existing code it continued to work fine for me with the changes in this PR so I think it is safe…. I removed the changes to artist_toptracks as that is major and will put up another PR when people start reporting problems with that.

@delatt
Copy link
Copy Markdown

delatt commented Apr 14, 2026

Looking at my Postman and Spotify responses:

The change from /tracks -> /items happened in #3436 but the response parsing was never updated so would have been broken from that point. So yeah, I think Spotify are gradually rolling things out (assuming nothing weird is going on with caching).

Maybe add a fallback or another case to find the item_key depending on what's in the response? This way both versions can be supported until the rollout is complete.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants