Skip to content

Handle renamed "item" field in playlist entries - #857

Merged
joostlek merged 1 commit into
mainfrom
ccr-af58c15a-nqvsya-playlist-item-field
Oct 30, 2026
Merged

joostlek merged 1 commit into
mainfrom
ccr-af58c15a-nqvsya-playlist-item-field

Conversation

@joostlek

Copy link
Copy Markdown
Owner

Proposed Changes

Spotify's February 2026 Web API changes renamed the playlist entry field track to item (tracks.tracks.track → items.items.item), and track is now deprecated. PlaylistTrack still required track, so get_playlist and get_playlist_items fail with MissingField: Field "track" ... when Spotify sends only item.

PlaylistTrack.__pre_deserialize__ now maps item onto track, so both payload shapes parse and the public PlaylistTrack.track attribute stays the same. This mirrors how Playlist.__pre_deserialize__ already maps tracks → items.

New fixtures contain only item (no track) for both endpoints. The new tests fail on main and pass with this change.

Related Issues


Generated by Claude Code

@joostlek joostlek added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Oct 30, 2026 — with Claude
@sonarqubecloud

Copy link
Copy Markdown

@joostlek
joostlek merged commit 9d4f7c4 into main Oct 30, 2026
13 of 14 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_playlist fails on the new "item" wrapper (Feb 2026 API change)

2 participants