librespot icon indicating copy to clipboard operation
librespot copied to clipboard

DJ X is not working

Open fegauthier opened this issue 3 months ago • 4 comments

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 :+1: 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

fegauthier avatar Sep 29 '25 11:09 fegauthier

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.

kingosticks avatar Sep 29 '25 11:09 kingosticks

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.

fegauthier avatar Sep 29 '25 12:09 fegauthier

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.

photovoltex avatar Sep 29 '25 15:09 photovoltex

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.

fegauthier avatar Sep 29 '25 15:09 fegauthier