-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
playlist_add_items has broken podcast episode id behavior #810
Comments
Just use |
Yup I'll use uris instead. I think it would be helpful though if the doc comment for |
You can't infer a URI from just an id. |
Right I understand that, but the doc comment seems to suggest that you can pass in a podcast episode id when you can't |
And the function does automatically infer uri from id, it just assumes type track |
Correct. You can pass a list of URIs instead, which include the ID category. |
To fix in v3 #652 |
Describe the bug
The "playlist_add_items" function states in its documentation that you can pass a list of podcast ids, but actually it seems like the only ids you can pass are track ids because it assumes the type of the id is a "track" - https://github.com/plamere/spotipy/blob/master/spotipy/client.py#L1030. I was able to add podcast episodes by passing in uris instead, which is a fine workaround. Maybe this is simply a documentation clarification fix? I can see how it would be annoying to accomodate both track & podcast episode ids here...
Your code
playlist_id = "5WC4NBV9O101t7EpJYgiKB"
podcast_episode_id = "6Ac19ix9yioyJDXtTtNp2V"
sp.playlist_add_items(
playlist_id,
[podcast_episode_id]
)
Expected behavior
I expected that passing a list of podcast episode ids to the "playlist_add_items" function would result in the episodes being added to the playlist
Output
http status: 400, code:-1 - https://api.spotify.com/v1/playlists/5WC4NBV9O101t7EpJYgiKB/tracks:
Payload contains a non-existing ID, reason: None
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: