mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #562] No way to get currently playing podcast episode #338
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#338
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @the-lay on GitHub (Aug 28, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/562
Describe the bug
If you are playing a podcast episode and try to run
current_playback, you will not get currently playing podcast episode.According to the me/player docs, you also need to pass
additional_types=episodeto get podcast data.current_playback calls
me/playerendpoint without additional_types and there is no way to pass it (only by manually building your own_internal_call).Here's an example API response to
me/playerwhen playing podcast:Environment:
Spotipy 2.13.0
@the-lay commented on GitHub (Aug 28, 2020):
P.S. Manually calling
_get("me/player", market=None, additional_types='episode')works fine, so the fix for this is to just addadditional_typeskeyword tocurrent_playback(market=None)@naiadbaksh commented on GitHub (Jan 10, 2022):
Hi Ilja, I'm having trouble with this working in Python. I'm trying to add the addtional_types keyword, but I can't get the syntax right on the request call. I get a response, but this is the response. Notice the item is null.
`HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"timestamp": 1641845238003,
"context": null,
"progress_ms": 2961089,
"item": null,
"currently_playing_type": "episode",
"actions": {
"disallows": {
"resuming": true
}
},
"is_playing": true
}`
Here is my function call.
`def execute_spotify_api_request_current(session_id, endpoint, post_=False, put_=False, ):
tokens = get_user_tokens(session_id)
headers = {'Content-Type': 'application/json',
'Authorization': "Bearer " + tokens.access_token}
# types = "track, episode"
@stephanebruckert commented on GitHub (Jan 10, 2022):
@naiadbaksh you don't seem to be using spotipy here?
@naiadbaksh commented on GitHub (Jan 10, 2022):
I was! I found that I add the additional_types into the endpoint ie:
endpoint = "player/currently-playing?additional_types=track,episode"and that allowed me to get the item
@stephanebruckert commented on GitHub (Jan 10, 2022):
So, all fixed?
Should be, as
additional_typeshas been added since the issue was raised https://spotipy.readthedocs.io/en/2.19.0/#spotipy.client.Spotify.currently_playing