[GH-ISSUE #547] Improving podcast/ show functionality. Adding podcast episodes to playlist #329

Closed
opened 2026-02-27 23:22:02 +03:00 by kerem · 0 comments
Owner

Originally created by @Ollewa123 on GitHub (Jul 26, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/547

While writing this issue I noticed that the code changed and user_playlist_add_tracks is no longer the encouraged function to use. Nevertheless it looks like the problem remains the same using playlist_add_items().

I'm trying to add episodes of a podcast/show to a given playlist. Using the intended function user_playlist_add_tracks(...) (or playlist_add_item) returns an 400 error given an episode-uri, eg: 'spotify:episode:1LcttrufAnmwPt9MqKSjh8'.

I think the problem lies somewhere how Spotipy hands over the track/episodes URIs.
In playlist_add_items() there is the following line of code:
ftracks = [self._get_uri("track", tid) for tid in items]
When entering an episode from a show the self._get_uri returns an URI in the format spotify:track:XXXX which will result in the 400 error since the requested URI is an episode.

When I changed the function and handed over the right URI with format spotify:episode:XXXX to ftracks the episode gets added to the playlist as intended.

Maybe someone could look over this and fix the problem.

Originally created by @Ollewa123 on GitHub (Jul 26, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/547 _While writing this issue I noticed that the code changed and user_playlist_add_tracks is no longer the encouraged function to use. Nevertheless it looks like the problem remains the same using playlist_add_items()._ I'm trying to add episodes of a podcast/show to a given playlist. Using the intended function user_playlist_add_tracks(...) (**or playlist_add_item**) returns an 400 error given an episode-uri, eg: 'spotify:episode:1LcttrufAnmwPt9MqKSjh8'. I think the problem lies somewhere how Spotipy hands over the track/episodes URIs. In playlist_add_items() there is the following line of code: ` ftracks = [self._get_uri("track", tid) for tid in items]` When entering an episode from a show the self._get_uri returns an URI in the format spotify:track:XXXX which will result in the 400 error since the requested URI is an episode. When I changed the function and handed over the right URI with format spotify:episode:XXXX to ftracks the episode gets added to the playlist as intended. Maybe someone could look over this and fix the problem.
kerem 2026-02-27 23:22:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#329
No description provided.