[GH-ISSUE #1604] Add DJ X support #732

Open
opened 2026-02-27 19:32:11 +03:00 by kerem · 5 comments
Owner

Originally created by @fegauthier on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1604

Look for similar bugs

Please check if there's already an issue for your problem.
If you've only a "me too" comment to make, consider if a 👍 reaction
will suffice.

Description

When using librespot to listen music, it's working well except DJ X.

Version

version 0.7.1

How to reproduce

Steps to reproduce the behavior in librespot e.g.

  1. Launch Librespot normally
  2. Connect Spotify to the device
  3. If you play a song it's working, but not working if it's DJ X

Log

Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::state::context] context didn't have any tracks: Context {
Sep 29 07:18:53 musiccast librespot[665]:         uri: Some(
Sep 29 07:18:53 musiccast librespot[665]:             "spotify:playlist:37i9dQZF1EYkqdzj48dyYq",
Sep 29 07:18:53 musiccast librespot[665]:         ),
Sep 29 07:18:53 musiccast librespot[665]:         url: Some(
Sep 29 07:18:53 musiccast librespot[665]:             "context://spotify:playlist:37i9dQZF1EYkqdzj48dyYq",
Sep 29 07:18:53 musiccast librespot[665]:         ),
Sep 29 07:18:53 musiccast librespot[665]:         metadata: {
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.background_color": "#FF0A59B8",
Sep 29 07:18:53 musiccast librespot[665]:             "add_context_load_reason": "true",
Sep 29 07:18:53 musiccast librespot[665]:             "context_description": "DJ",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.dj.transcript_text": "It's me, your DJ. Pulling together music just for you.",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.jellyfish_top_color": "#FF19E68C",
Sep 29 07:18:53 musiccast librespot[665]:             "lexicon_context_url": "hm://lexicon-session-provider/context-resolve/v2/session?contextUri=spotify:playlist:37i9dQZF1EYkqdzj48dyYq",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.tag_color": "#FF0D72EA",
Sep 29 07:18:53 musiccast librespot[665]:             "context_long_description": "DJ",
Sep 29 07:18:53 musiccast librespot[665]:             "context_owner": "spotify",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.jellyfish_mid_color": "#CB1ED7BC",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.jellyfish_animation": "https://lexicon-assets.spotifycdn.com/DJ_Lottie_tighter.json",
Sep 29 07:18:53 musiccast librespot[665]:             "format_list_type": "unknown",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.text_color": "#FFFFFFFF",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.dj.transcript_id": "familiarnostalgia8",
Sep 29 07:18:53 musiccast librespot[665]:             "home.card.jellyfish_bottom_color": "#7F1E95D7",
Sep 29 07:18:53 musiccast librespot[665]:             "lexicon_set_type": "your_dj",
Sep 29 07:18:53 musiccast librespot[665]:         },
Sep 29 07:18:53 musiccast librespot[665]:         restrictions: MessageField(
Sep 29 07:18:53 musiccast librespot[665]:             None,
Sep 29 07:18:53 musiccast librespot[665]:         ),
Sep 29 07:18:53 musiccast librespot[665]:         pages: [
Sep 29 07:18:53 musiccast librespot[665]:             ContextPage {
Sep 29 07:18:53 musiccast librespot[665]:                 page_url: None,
Sep 29 07:18:53 musiccast librespot[665]:                 next_page_url: None,
Sep 29 07:18:53 musiccast librespot[665]:                 metadata: {},
Sep 29 07:18:53 musiccast librespot[665]:                 tracks: [],
Sep 29 07:18:53 musiccast librespot[665]:                 loading: None,
Sep 29 07:18:53 musiccast librespot[665]:                 special_fields: SpecialFields {
Sep 29 07:18:53 musiccast librespot[665]:                     unknown_fields: UnknownFields {
Sep 29 07:18:53 musiccast librespot[665]:                         fields: None,
Sep 29 07:18:53 musiccast librespot[665]:                     },
Sep 29 07:18:53 musiccast librespot[665]:                     cached_size: CachedSize {
Sep 29 07:18:53 musiccast librespot[665]:                         size: 0,
Sep 29 07:18:53 musiccast librespot[665]:                     },
Sep 29 07:18:53 musiccast librespot[665]:                 },
Sep 29 07:18:53 musiccast librespot[665]:             },
Sep 29 07:18:53 musiccast librespot[665]:         ],
Sep 29 07:18:53 musiccast librespot[665]:         loading: None,
Sep 29 07:18:53 musiccast librespot[665]:         special_fields: SpecialFields {
Sep 29 07:18:53 musiccast librespot[665]:             unknown_fields: UnknownFields {
Sep 29 07:18:53 musiccast librespot[665]:                 fields: None,
Sep 29 07:18:53 musiccast librespot[665]:             },
Sep 29 07:18:53 musiccast librespot[665]:             cached_size: CachedSize {
Sep 29 07:18:53 musiccast librespot[665]:                 size: 0,
Sep 29 07:18:53 musiccast librespot[665]:             },
Sep 29 07:18:53 musiccast librespot[665]:         },
Sep 29 07:18:53 musiccast librespot[665]:     }
Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::spirc] Invalid state { the provided context has no tracks }
Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::context_resolver] setup of state failed: Invalid state { context is not available. type: Default }, last used resolve ResolveContext {
Sep 29 07:18:53 musiccast librespot[665]:         resolve: Uri(
Sep 29 07:18:53 musiccast librespot[665]:             "spotify:playlist:37i9dQZF1EYkqdzj48dyYq",
Sep 29 07:18:53 musiccast librespot[665]:         ),
Sep 29 07:18:53 musiccast librespot[665]:         fallback: Some(
Sep 29 07:18:53 musiccast librespot[665]:             "spotify:playlist:37i9dQZF1EYkqdzj48dyYq",
Sep 29 07:18:53 musiccast librespot[665]:         ),
Sep 29 07:18:53 musiccast librespot[665]:         update: Default,
Sep 29 07:18:53 musiccast librespot[665]:         action: Replace,
Sep 29 07:18:53 musiccast librespot[665]:     }
Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { context is not available. type: Default }

Host (what you are running librespot on):

  • OS: Linux
  • Platform: Debian Bookworm
Originally created by @fegauthier on GitHub (Sep 29, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1604 ### Look for similar bugs Please check if there's [already an issue](https://github.com/librespot-org/librespot/issues) for your problem. If you've only a "me too" comment to make, consider if a :+1: [reaction](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) will suffice. ### Description When using librespot to listen music, it's working well except DJ X. ### Version version 0.7.1 ### How to reproduce Steps to reproduce the behavior in *librespot* e.g. 1. Launch Librespot normally 2. Connect Spotify to the device 3. If you play a song it's working, but not working if it's DJ X ### Log ``` Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::state::context] context didn't have any tracks: Context { Sep 29 07:18:53 musiccast librespot[665]: uri: Some( Sep 29 07:18:53 musiccast librespot[665]: "spotify:playlist:37i9dQZF1EYkqdzj48dyYq", Sep 29 07:18:53 musiccast librespot[665]: ), Sep 29 07:18:53 musiccast librespot[665]: url: Some( Sep 29 07:18:53 musiccast librespot[665]: "context://spotify:playlist:37i9dQZF1EYkqdzj48dyYq", Sep 29 07:18:53 musiccast librespot[665]: ), Sep 29 07:18:53 musiccast librespot[665]: metadata: { Sep 29 07:18:53 musiccast librespot[665]: "home.card.background_color": "#FF0A59B8", Sep 29 07:18:53 musiccast librespot[665]: "add_context_load_reason": "true", Sep 29 07:18:53 musiccast librespot[665]: "context_description": "DJ", Sep 29 07:18:53 musiccast librespot[665]: "home.card.dj.transcript_text": "It's me, your DJ. Pulling together music just for you.", Sep 29 07:18:53 musiccast librespot[665]: "home.card.jellyfish_top_color": "#FF19E68C", Sep 29 07:18:53 musiccast librespot[665]: "lexicon_context_url": "hm://lexicon-session-provider/context-resolve/v2/session?contextUri=spotify:playlist:37i9dQZF1EYkqdzj48dyYq", Sep 29 07:18:53 musiccast librespot[665]: "home.card.tag_color": "#FF0D72EA", Sep 29 07:18:53 musiccast librespot[665]: "context_long_description": "DJ", Sep 29 07:18:53 musiccast librespot[665]: "context_owner": "spotify", Sep 29 07:18:53 musiccast librespot[665]: "home.card.jellyfish_mid_color": "#CB1ED7BC", Sep 29 07:18:53 musiccast librespot[665]: "home.card.jellyfish_animation": "https://lexicon-assets.spotifycdn.com/DJ_Lottie_tighter.json", Sep 29 07:18:53 musiccast librespot[665]: "format_list_type": "unknown", Sep 29 07:18:53 musiccast librespot[665]: "home.card.text_color": "#FFFFFFFF", Sep 29 07:18:53 musiccast librespot[665]: "home.card.dj.transcript_id": "familiarnostalgia8", Sep 29 07:18:53 musiccast librespot[665]: "home.card.jellyfish_bottom_color": "#7F1E95D7", Sep 29 07:18:53 musiccast librespot[665]: "lexicon_set_type": "your_dj", Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: restrictions: MessageField( Sep 29 07:18:53 musiccast librespot[665]: None, Sep 29 07:18:53 musiccast librespot[665]: ), Sep 29 07:18:53 musiccast librespot[665]: pages: [ Sep 29 07:18:53 musiccast librespot[665]: ContextPage { Sep 29 07:18:53 musiccast librespot[665]: page_url: None, Sep 29 07:18:53 musiccast librespot[665]: next_page_url: None, Sep 29 07:18:53 musiccast librespot[665]: metadata: {}, Sep 29 07:18:53 musiccast librespot[665]: tracks: [], Sep 29 07:18:53 musiccast librespot[665]: loading: None, Sep 29 07:18:53 musiccast librespot[665]: special_fields: SpecialFields { Sep 29 07:18:53 musiccast librespot[665]: unknown_fields: UnknownFields { Sep 29 07:18:53 musiccast librespot[665]: fields: None, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: cached_size: CachedSize { Sep 29 07:18:53 musiccast librespot[665]: size: 0, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: ], Sep 29 07:18:53 musiccast librespot[665]: loading: None, Sep 29 07:18:53 musiccast librespot[665]: special_fields: SpecialFields { Sep 29 07:18:53 musiccast librespot[665]: unknown_fields: UnknownFields { Sep 29 07:18:53 musiccast librespot[665]: fields: None, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: cached_size: CachedSize { Sep 29 07:18:53 musiccast librespot[665]: size: 0, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: }, Sep 29 07:18:53 musiccast librespot[665]: } Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::spirc] Invalid state { the provided context has no tracks } Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::context_resolver] setup of state failed: Invalid state { context is not available. type: Default }, last used resolve ResolveContext { Sep 29 07:18:53 musiccast librespot[665]: resolve: Uri( Sep 29 07:18:53 musiccast librespot[665]: "spotify:playlist:37i9dQZF1EYkqdzj48dyYq", Sep 29 07:18:53 musiccast librespot[665]: ), Sep 29 07:18:53 musiccast librespot[665]: fallback: Some( Sep 29 07:18:53 musiccast librespot[665]: "spotify:playlist:37i9dQZF1EYkqdzj48dyYq", Sep 29 07:18:53 musiccast librespot[665]: ), Sep 29 07:18:53 musiccast librespot[665]: update: Default, Sep 29 07:18:53 musiccast librespot[665]: action: Replace, Sep 29 07:18:53 musiccast librespot[665]: } Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default Sep 29 07:18:53 musiccast librespot[665]: [2025-09-29T11:18:53Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { context is not available. type: Default } ``` ### Host (what you are running `librespot` on): - OS: Linux - Platform: Debian Bookworm
Author
Owner

@kingosticks commented on GitHub (Sep 29, 2025):

This is my first usage of "DJ X". For me, librespot gave those same errors but then it did play the correct track. But only that track and then stopped, the "queue" is empty (there doesn't appear to be a queue available for DJ X). Maybe that's the same as you describe in your OP, isn't clear to me. I think it might be playing the fallback uri instead (which in my case was an actual track URI, rather than the DJX playlist again that you got).

This feature works quite differently from normal playlists. Notice that https://open.spotify.com/playlist/37i9dQZF1EYkqdzj48dyYq doesn't load. Someone interested would need to investigate what their Spotify client is doing to resolve this weird playlist.

<!-- gh-comment-id:3346548166 --> @kingosticks commented on GitHub (Sep 29, 2025): This is my first usage of "DJ X". For me, librespot gave those same errors but then it did play the correct track. But only that track and then stopped, the "queue" is empty (there doesn't appear to be a queue available for DJ X). Maybe that's the same as you describe in your OP, isn't clear to me. I think it might be playing the `fallback` uri instead (which in my case was an actual track URI, rather than the DJX playlist again that you got). This feature works quite differently from normal playlists. Notice that https://open.spotify.com/playlist/37i9dQZF1EYkqdzj48dyYq doesn't load. Someone interested would need to investigate what their Spotify client is doing to resolve this weird playlist.
Author
Owner

@fegauthier commented on GitHub (Sep 29, 2025):

This is my first usage of "DJ X". For me, librespot gave those same errors but then it did play the correct track. But only that track and then stopped, the "queue" is empty (there doesn't appear to be a queue available for DJ X). Maybe that's the same as you describe in your OP, isn't clear to me. I think it might be playing the fallback uri instead (which in my case was an actual track URI, rather than the DJX playlist again that you got).

This feature works quite differently from normal playlists. Notice that https://open.spotify.com/playlist/37i9dQZF1EYkqdzj48dyYq doesn't load. Someone interested would need to investigate what their Spotify client is doing to resolve this weird playlist.

It’s exactly the behavior I have.

Here’s how DJ X works:
DJ X talks for 5–10 seconds, then a playlist of 5 songs plays. After that, he talks again, and another playlist of 5 songs follows, and so on.

<!-- gh-comment-id:3346559967 --> @fegauthier commented on GitHub (Sep 29, 2025): > This is my first usage of "DJ X". For me, librespot gave those same errors but then it did play the correct track. But only that track and then stopped, the "queue" is empty (there doesn't appear to be a queue available for DJ X). Maybe that's the same as you describe in your OP, isn't clear to me. I think it might be playing the `fallback` uri instead (which in my case was an actual track URI, rather than the DJX playlist again that you got). > > This feature works quite differently from normal playlists. Notice that https://open.spotify.com/playlist/37i9dQZF1EYkqdzj48dyYq doesn't load. Someone interested would need to investigate what their Spotify client is doing to resolve this weird playlist. It’s exactly the behavior I have. Here’s how DJ X works: DJ X talks for 5–10 seconds, then a playlist of 5 songs plays. After that, he talks again, and another playlist of 5 songs follows, and so on.
Author
Owner

@photovoltex commented on GitHub (Sep 29, 2025):

I don't have access to the feature so I can't help on this end. And I'm not even sure we can support this when the context we are getting, doesn't have any tracks.

<!-- gh-comment-id:3347712177 --> @photovoltex commented on GitHub (Sep 29, 2025): I don't have access to the feature so I can't help on this end. And I'm not even sure we can support this when the context we are getting, doesn't have any tracks.
Author
Owner

@fegauthier commented on GitHub (Sep 29, 2025):

I don't have access to the feature so I can't help on this end. And I'm not even sure we can support this when the context we are getting, doesn't have any tracks.

Spotify Public API doesnt seems to provide any info about DJ X tracks... Digging HTTP requests from Android Spotify should help me to understand how it works.

<!-- gh-comment-id:3347790527 --> @fegauthier commented on GitHub (Sep 29, 2025): > I don't have access to the feature so I can't help on this end. And I'm not even sure we can support this when the context we are getting, doesn't have any tracks. Spotify Public API doesnt seems to provide any info about DJ X tracks... Digging HTTP requests from Android Spotify should help me to understand how it works.
Author
Owner

@kingosticks commented on GitHub (Jan 28, 2026):

Related: https://github.com/devgianlu/go-librespot/issues/287

<!-- gh-comment-id:3811616927 --> @kingosticks commented on GitHub (Jan 28, 2026): Related: https://github.com/devgianlu/go-librespot/issues/287
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/librespot#732
No description provided.