[GH-ISSUE #398] Context type "collectionyourepisodes" throws an error when retrieved using the current_playback function #127

Closed
opened 2026-02-27 20:23:16 +03:00 by kerem · 3 comments
Owner

Originally created by @ndoolan360 on GitHub (Apr 10, 2023).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/398

Describe the bug
The context type "collectionyourepisodes" throws an error when retrieved using the current_playback function.

To Reproduce
Steps to reproduce the behavior:

  1. Create any app using rspotify.
  2. Using the Spotify desktop app (or other) play an episode from the "Your Episodes" playlist.
  3. Have the app created in 1. call the current_playback function.
  4. See error

Expected behavior
The model is able to handle all types that it could receive for the context type.

Log/Output data

ParseJson(
    Error("unknown variant `collectionyourepisodes`, expected one of `artist`, `album`, `track`, `playlist`, `user`, `show`, `episode`, `collection`", line: 19, column: 37),
)

Additional context
Not sure if this is an issue with rspotify or with the Spotify API.

Originally created by @ndoolan360 on GitHub (Apr 10, 2023). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/398 **Describe the bug** The context type "collectionyourepisodes" throws an error when retrieved using the `current_playback` function. **To Reproduce** Steps to reproduce the behavior: 1. Create any app using rspotify. 2. Using the Spotify desktop app (or other) play an episode from the "Your Episodes" playlist. 3. Have the app created in 1. call the `current_playback` function. 4. See error **Expected behavior** The model is able to handle all types that it could receive for the context type. **Log/Output data** ``` ParseJson( Error("unknown variant `collectionyourepisodes`, expected one of `artist`, `album`, `track`, `playlist`, `user`, `show`, `episode`, `collection`", line: 19, column: 37), ) ``` **Additional context** Not sure if this is an issue with rspotify or with the Spotify API.
kerem 2026-02-27 20:23:16 +03:00
Author
Owner

@ramsayleung commented on GitHub (Apr 10, 2023):

From your error message, it looks like that Spotify has added a new variant collectionyourepisodes for the Type Enum.

Would you like to give me the response of your request with web console, so I could write a test case for this issue?

https://developer.spotify.com/documentation/web-api/reference/get-information-about-the-users-current-playback

<!-- gh-comment-id:1501396878 --> @ramsayleung commented on GitHub (Apr 10, 2023): From your error message, it looks like that Spotify has added a new variant `collectionyourepisodes` for the `Type` Enum. Would you like to give me the response of your request with web console, so I could write a test case for this issue? https://developer.spotify.com/documentation/web-api/reference/get-information-about-the-users-current-playback
Author
Owner

@ndoolan360 commented on GitHub (May 12, 2023):

This is the state returned when playing an episode from the "Your Episodes" playlist
(truncated some info for both privacy and brevity).

    "actions": {
        "disallows": {
            "resuming": true
        }
    },
    "context": {
        "external_urls": {
            "spotify": "https://open.spotify.com/collection/episodes"
        },
        "href": "https://api.spotify.com/v1/me/episodes",
        "type": "collectionyourepisodes",
        "uri": "spotify:user:<username>:collection:your-episodes"
    },
    "currently_playing_type": "episode",
    "device": {
        ...
    },
    "is_playing": true,
    "item": {
        "is_externally_hosted": false,
        "is_playable": true,
        "type": "episode",
        ...
    },
    "progress_ms": 3515556,
    "repeat_state": "context",
    "shuffle_state": true,
    "timestamp": 1683852851109
}```
<!-- gh-comment-id:1544951039 --> @ndoolan360 commented on GitHub (May 12, 2023): This is the state returned when playing an episode from the "Your Episodes" playlist (truncated some info for both privacy and brevity). ```{ "actions": { "disallows": { "resuming": true } }, "context": { "external_urls": { "spotify": "https://open.spotify.com/collection/episodes" }, "href": "https://api.spotify.com/v1/me/episodes", "type": "collectionyourepisodes", "uri": "spotify:user:<username>:collection:your-episodes" }, "currently_playing_type": "episode", "device": { ... }, "is_playing": true, "item": { "is_externally_hosted": false, "is_playable": true, "type": "episode", ... }, "progress_ms": 3515556, "repeat_state": "context", "shuffle_state": true, "timestamp": 1683852851109 }```
Author
Owner

@ramsayleung commented on GitHub (May 14, 2023):

This problem has been fixed, you could give v0.11.7 a try.

<!-- gh-comment-id:1547025064 --> @ramsayleung commented on GitHub (May 14, 2023): This problem has been fixed, you could give v0.11.7 a try.
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/rspotify#127
No description provided.