Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotify Player no longer remembers current playlist, etc #640

Open
rlees85 opened this issue Dec 17, 2024 · 3 comments
Open

Spotify Player no longer remembers current playlist, etc #640

rlees85 opened this issue Dec 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rlees85
Copy link

rlees85 commented Dec 17, 2024

Describe the bug
Previously, Spotify Player used to remember the playlist it was playing. If I was to quit Spotify Player and open it again later on or the next day, it would know the song and playlist from where it left off and continue playing.

Now, for a while (since 0.20 at least) it does not. Whenever Spotify Player is opened it has the message "No playback found. Please start a new playback." From here I have to search for the playlist again and start from the very beginning.

At first I thought it was corruption on my side but I have removed Spotify Players configuration and cache folders and started from the beginning - the problem remains.

To Reproduce

  • Open Spotify Player
  • Search for a playlist
  • Play a few songs
  • Quit
  • Re-open Spotify Player
  • All state is completely lost

Expected behaviour
For the current song that was playing to be remembered along with the playlist.

Log and backtrace
Log from opening up picking a playlist playing a song for a while and then quitting. The last line is simply this:

  47   │ 2024-12-17T11:07:59.507829Z  INFO client_request{request=GetCurrentUserQueue}: spotify_player::client: Successfully handl
       │ ed the client request, took: 188ms

Implying that no state or anything special was stored. All the other entries before were to do with searching for a playlist and playing something, which worked just fine.

... and when loading back in and getting nothing, these are the logs:

   2   │ 2024-12-17T11:10:44.089658Z  INFO spotify_player::state::data: Loading Playlists data from /home/user/.cache/spotify-play
       │ er/Playlists_cache.json...
   3   │ 2024-12-17T11:10:44.089677Z  INFO spotify_player::state::data: Successfully loaded Playlists data!
   4   │ 2024-12-17T11:10:44.089689Z  INFO spotify_player::state::data: Loading FollowedArtists data from /home/user/.cache/spotif
       │ y-player/FollowedArtists_cache.json...
   5   │ 2024-12-17T11:10:44.089707Z  INFO spotify_player::state::data: Successfully loaded FollowedArtists data!
   6   │ 2024-12-17T11:10:44.089710Z  INFO spotify_player::state::data: Loading SavedShows data from /home/user/.cache/spotify-pla
       │ yer/SavedShows_cache.json...
   7   │ 2024-12-17T11:10:44.089716Z  INFO spotify_player::state::data: Successfully loaded SavedShows data!
   8   │ 2024-12-17T11:10:44.089719Z  INFO spotify_player::state::data: Loading SavedAlbums data from /home/user/.cache/spotify-pl
       │ ayer/SavedAlbums_cache.json...
   9   │ 2024-12-17T11:10:44.089724Z  INFO spotify_player::state::data: Successfully loaded SavedAlbums data!
  10   │ 2024-12-17T11:10:44.089727Z  INFO spotify_player::state::data: Loading SavedTracks data from /home/user/.cache/spotify-pl
       │ ayer/SavedTracks_cache.json...
  11   │ 2024-12-17T11:10:44.089751Z  INFO spotify_player::state::data: Successfully loaded SavedTracks data!
  12   │ 2024-12-17T11:10:44.120518Z  INFO spotify_player::auth: Using cached credentials
  13   │ 2024-12-17T11:10:44.120530Z  INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name:
       │ "spotify-player", device_type: Speaker, is_group: false, initial_volume: Some(45875), has_volume_ctrl: true }
  14   │ 2024-12-17T11:10:44.120538Z  INFO librespot_playback::mixer::softmixer: Mixing with softvol and volume control: Log(60.0)
       │
  15   │ 2024-12-17T11:10:44.120556Z  INFO spotify_player::streaming: Initializing a new integrated player with device_id=[uuid removed]
  16   │ 2024-12-17T11:10:44.120598Z  INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spir
       │ c protocol
  17   │ 2024-12-17T11:10:44.120727Z  INFO librespot_playback::convert: Converting with ditherer: tpdf
  18   │ 2024-12-17T11:10:44.120747Z  INFO librespot_playback::audio_backend::gstreamer: Using GStreamer sink with format: S16
  19   │ 2024-12-17T11:10:44.266150Z  INFO librespot_core::session: Connecting to AP "ap-gew1.spotify.com:4070"
  20   │ 2024-12-17T11:10:44.360693Z  INFO librespot_core::session: Authenticated as '[random string removed]' !
  21   │ 2024-12-17T11:10:44.360943Z  INFO spotify_player::streaming: New streaming connection has been established!
  22   │ 2024-12-17T11:10:44.360955Z  INFO spotify_player::client: Used a new session for Spotify client.
  23   │ 2024-12-17T11:10:44.360966Z  INFO spotify_player::token: Getting a new authentication token...
  24   │ 2024-12-17T11:10:44.361049Z  INFO librespot_core::session: Country: "GB"
  25   │ 2024-12-17T11:10:44.408881Z  INFO spotify_player::token: Got new token: Token { access_token: "[token removed]", expi
       │ res_in: TimeDelta { secs: 3600, nanos: 0 }, expires_at: Some(2024-12-17T12:10:44.408875129Z), refresh_token: None, scopes
       │ : {} }
  26   │ 2024-12-17T11:10:44.409175Z  INFO spotify_player: Starting a client socket at 127.0.0.1:8080
  27   │ 2024-12-17T11:10:44.409593Z  INFO spotify_player::media_control: Initializing application's media control event watcher..
       │ .
  28   │ 2024-12-17T11:10:44.480351Z  INFO client_request{request=GetCurrentUser}: spotify_player::client: Successfully handled th
       │ e client request, took: 70ms
  29   │ 2024-12-17T11:10:44.487800Z  INFO client_request{request=GetUserSavedAlbums}: spotify_player::client: Successfully handle
       │ d the client request, took: 78ms
  30   │ 2024-12-17T11:10:44.494225Z  INFO client_request{request=GetUserSavedShows}: spotify_player::client: Successfully handled
       │  the client request, took: 84ms
  31   │ 2024-12-17T11:10:44.503630Z  INFO client_request{request=GetUserPlaylists}: spotify_player::client: Successfully handled
       │ the client request, took: 94ms
  32   │ 2024-12-17T11:10:44.531048Z  INFO client_request{request=GetUserSavedTracks}: spotify_player::client: Successfully handle
       │ d the client request, took: 121ms
  33   │ 2024-12-17T11:10:44.564177Z  INFO client_request{request=GetUserFollowedArtists}: spotify_player::client: Successfully ha
       │ ndled the client request, took: 154ms
  34   │ 2024-12-17T11:10:45.482523Z  WARN spotify_player::client: No device found. Please make sure you already setup Spotify Con
       │ nect support as described in https://github.com/aome510/spotify-player#spotify-connect.
  35   │ 2024-12-17T11:10:45.482602Z  INFO spotify_player::client: Trying to connect to device (id=c8d6c379-41f2-4b96-b988-0e4fdf0
       │ ad037)
  36   │ 2024-12-17T11:10:45.496433Z  WARN spotify_player::client: No device found. Please make sure you already setup Spotify Con
       │ nect support as described in https://github.com/aome510/spotify-player#spotify-connect.
  37   │ 2024-12-17T11:10:45.496511Z  INFO spotify_player::client: Trying to connect to device (id=c8d6c379-41f2-4b96-b988-0e4fdf0
       │ ad037)
  38   │ 2024-12-17T11:10:45.599654Z  INFO spotify_player::client: Connection succeeded (device_id=c8d6c379-41f2-4b96-b988-0e4fdf0
       │ ad037)!
  39   │ 2024-12-17T11:10:45.603082Z  INFO librespot_connect::spirc: No more tracks left in queue
  40   │ 2024-12-17T11:10:45.603259Z  INFO librespot_core::spclient: Resolved "gew1-spclient.spotify.com:443" as spclient access p
       │ oint
  41   │ 2024-12-17T11:10:45.607727Z  INFO spotify_player::client: Connection succeeded (device_id=c8d6c379-41f2-4b96-b988-0e4fdf0
       │ ad037)!
  42   │ 2024-12-17T11:10:45.653982Z ERROR librespot_connect::spirc: ContextError: Error { kind: NotFound, error: StatusCode(404)
       │ }
  43   │ 2024-12-17T11:10:45.654122Z  INFO librespot_connect::spirc: No more tracks left in queue
  44   │ 2024-12-17T11:10:45.679779Z ERROR librespot_connect::spirc: ContextError: Error { kind: NotFound, error: StatusCode(404)
       │ }

Screenshots
N/A

Environment

  • OS: Arch Linux
  • Application version: 0.20.4 (happened before this though)

Additional context
I can see its moaning about Spotify connect. This was NOT needed before however!

@rlees85 rlees85 added the bug Something isn't working label Dec 17, 2024
@rlees85
Copy link
Author

rlees85 commented Dec 17, 2024

I set up Spotify Connect it makes 0 difference anyway.

@aome510
Copy link
Owner

aome510 commented Dec 17, 2024

Previously, Spotify Player used to remember the playlist it was playing. If I was to quit Spotify Player and open it again later on or the next day, it would know the song and playlist from where it left off and continue playing.

I also realized this. Don't think it's a bug but an intended behaviour. I suspect the new librespot version, which we upgraded to recently, doesn't support the above "remember" feature anymore.

@rlees85
Copy link
Author

rlees85 commented Dec 17, 2024

Kind of glad that its not just me. That would certainly make sense. I guess I raise an issue over there, not sure exactly how to word it mind.

I'm normally using playlists with 1000 or so items in them, so its kind of a pain to keep going back to the start 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants