[GH-ISSUE #232] Shuffle still on even on false #1053

Closed
opened 2026-03-14 13:14:28 +03:00 by kerem · 4 comments
Owner

Originally created by @matilde-t on GitHub (Aug 6, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/232

Describe the bug
Even if shuffle is set to false, songs in playlists are still random

To Reproduce

  • set shuffle:false through ctrl+s
  • play next song through n

Expected behavior
Songs played in the order displayed in the playlist

Log and backtrace

2023-08-06T20:11:20.432587Z  INFO spotify_player: General configurations: AppConfig { theme: "dracula", client_id: "65b708073fc0480ea92a077233ca87bd", client_port: 8080, copy_command: Command { command: "xclip", args: ["-sel", "c"] }, playback_format: "{track} • {artists}\n{album}\n{metadata}", notify_format: NotifyFormat { summary: "{track} • {artists}", body: "{album}" }, tracks_playback_limit: 50, proxy: None, ap_port: None, app_refresh_duration_in_ms: 32, playback_refresh_duration_in_ms: 0, cover_image_refresh_duration_in_ms: 2000, page_size_in_rows: 20, track_table_item_max_len: 32, play_icon: "▶", pause_icon: "▌▌", liked_icon: "♥", border_type: Plain, progress_bar_type: Rectangle, playback_window_position: Top, cover_img_length: 9, cover_img_width: 5, cover_img_scale: 1.0, playback_window_width: 6, enable_media_control: true, enable_streaming: true, enable_cover_image_cache: true, default_device: "spotify-player", device: DeviceConfig { name: "spotify-player", device_type: "speaker", volume: 50, bitrate: 160, audio_cache: false } }
2023-08-06T20:11:20.432663Z  INFO spotify_player: Theme configurations: ThemeConfig { themes: [Theme { name: "default", palette: Palette { background: None, foreground: None, black: Color { color: Black }, blue: Color { color: LightBlue }, cyan: Color { color: LightCyan }, green: Color { color: LightGreen }, magenta: Color { color: LightMagenta }, red: Color { color: LightRed }, white: Color { color: Gray }, yellow: Color { color: LightYellow }, bright_black: Color { color: DarkGray }, bright_white: Color { color: White }, bright_red: Color { color: Red }, bright_magenta: Color { color: Magenta }, bright_green: Color { color: Green }, bright_cyan: Color { color: Cyan }, bright_blue: Color { color: Blue }, bright_yellow: Color { color: Yellow } }, component_style: ComponentStyle { block_title: None, border: None, playback_track: None, playback_artists: None, playback_album: None, playback_metadata: None, playback_progress_bar: None, current_playing: None, page_desc: None, table_header: None, selection: None } }] }
2023-08-06T20:11:20.432696Z  INFO spotify_player: Keymap configurations: KeymapConfig { keymaps: [Keymap { key_sequence: KeySequence { keys: [None(Char('n'))] }, command: NextTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('p'))] }, command: PreviousTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('.'))] }, command: PlayRandom }, Keymap { key_sequence: KeySequence { keys: [None(Char(' '))] }, command: ResumePause }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('r'))] }, command: Repeat }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('s'))] }, command: Shuffle }, Keymap { key_sequence: KeySequence { keys: [None(Char('+'))] }, command: VolumeUp }, Keymap { key_sequence: KeySequence { keys: [None(Char('-'))] }, command: VolumeDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('>'))] }, command: SeekForward }, Keymap { key_sequence: KeySequence { keys: [None(Char('<'))] }, command: SeekBackward }, Keymap { key_sequence: KeySequence { keys: [None(Enter)] }, command: ChooseSelected }, Keymap { key_sequence: KeySequence { keys: [None(Char('r'))] }, command: RefreshPlayback }, Keymap { key_sequence: KeySequence { keys: [None(Char('/'))] }, command: Search }, Keymap { key_sequence: KeySequence { keys: [None(Char('z'))] }, command: Queue }, Keymap { key_sequence: KeySequence { keys: [None(Char('Z'))] }, command: AddSelectedItemToQueue }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char(' '))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('a'))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('a'))] }, command: ShowActionsOnCurrentTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('R'))] }, command: RestartIntegratedClient }, Keymap { key_sequence: KeySequence { keys: [None(Tab)] }, command: FocusNextWindow }, Keymap { key_sequence: KeySequence { keys: [None(BackTab)] }, command: FocusPreviousWindow }, Keymap { key_sequence: KeySequence { keys: [None(Char('T'))] }, command: SwitchTheme }, Keymap { key_sequence: KeySequence { keys: [None(Char('D'))] }, command: SwitchDevice }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('p'))] }, command: BrowseUserPlaylists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('a'))] }, command: BrowseUserFollowedArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('A'))] }, command: BrowseUserSavedAlbums }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char(' '))] }, command: CurrentlyPlayingContextPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('t'))] }, command: TopTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('r'))] }, command: RecentlyPlayedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('y'))] }, command: LikedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('L'))] }, command: LyricPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('l'))] }, command: LyricPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('l'))] }, command: LibraryPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] }, command: SearchPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('b'))] }, command: BrowsePage }, Keymap { key_sequence: KeySequence { keys: [None(Backspace)] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('q'))] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('?'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('h'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [None(Char('q'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('c'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [None(Esc)] }, command: ClosePopup }, Keymap { key_sequence: KeySequence { keys: [None(Char('j'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('n'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Down)] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('k'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('p'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(Up)] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageUp)] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('b'))] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageDown)] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('f'))] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('g'))] }, command: SelectFirstOrScrollToTop }, Keymap { key_sequence: KeySequence { keys: [None(Home)] }, command: SelectFirstOrScrollToTop }, Keymap { key_sequence: KeySequence { keys: [None(Char('G'))] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(End)] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('t'))] }, command: SortTrackByTitle }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('a'))] }, command: SortTrackByArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('A'))] }, command: SortTrackByAlbum }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('d'))] }, command: SortTrackByDuration }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('D'))] }, command: SortTrackByAddedDate }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('r'))] }, command: ReverseTrackOrder }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('k'))] }, command: MovePlaylistItemUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('j'))] }, command: MovePlaylistItemDown }] }
2023-08-06T20:11:21.122126Z  INFO spotify_player::auth: Successfully used the cached credentials to create a new session!
2023-08-06T20:11:21.188140Z  INFO spotify_player::token: Getting new authentication token...
2023-08-06T20:11:21.419133Z  INFO spotify_player::token: Got new token: Token { access_token: "BQCC4fKBhwN3OL8fr4Oche9S5Uck8mZoxSBATkGs9QakRv03XLw_tXLhmYJwNUpLKgV3jnkXU8wAknCZenYrq48AYPIhD5vGXXgCCeEN3jAUR3iqMW2yaXIQtLSviT-aj1j2HAp0npDw-sNvfBRarcgGQaw254iSOO7cnpZWAXBL9ax_Kzyxu9-0fhp89ZICrWPmvRsrrXhp5dX3mZq3hFoYfk3-zj2YeKk5I7yOq-24h36OVYj5Y-F-FzvntTpGrJ7jPODas1_ERbInV6cKin-H1Zx44LL2nnk4tHOTL8YJJg", expires_in: Duration { secs: 3600, nanos: 0 }, expires_at: Some(2023-08-06T21:11:21.419120920Z), refresh_token: None, scopes: {} }
2023-08-06T20:11:21.419263Z  INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, initial_volume: Some(32768), has_volume_ctrl: true, autoplay: false }
2023-08-06T20:11:21.419343Z  INFO spotify_player::streaming: Initializing a new integrated player with device_id=6319cebd-10d2-416b-b61f-2935b9ba1498
2023-08-06T20:11:21.419600Z  INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol
2023-08-06T20:11:21.720751Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 32768 }
2023-08-06T20:11:21.779885Z  INFO spotify_player: No playback found on startup, trying to connect to an available device...
2023-08-06T20:11:21.780303Z  INFO spotify_player::cli::client: Starting a client socket at 127.0.0.1:8080
2023-08-06T20:11:21.782256Z  INFO spotify_player::media_control: Initializing application's media control event watcher...
2023-08-06T20:11:21.833656Z  INFO client_request{request=GetCurrentUser}: spotify_player::client: successfully handled the client request, took: 52ms
2023-08-06T20:11:21.965689Z  INFO client_request{request=GetUserPlaylists}: spotify_player::client: successfully handled the client request, took: 184ms
2023-08-06T20:11:22.170779Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 390ms
2023-08-06T20:11:22.212819Z  INFO client_request{request=GetUserFollowedArtists}: spotify_player::client: successfully handled the client request, took: 431ms
2023-08-06T20:11:22.455603Z  INFO client_request{request=GetUserSavedAlbums}: spotify_player::client: successfully handled the client request, took: 674ms
2023-08-06T20:11:22.835542Z  INFO client_request{request=ConnectDevice(None)}: spotify_player::client: Available devices: []
2023-08-06T20:11:22.835633Z  INFO client_request{request=ConnectDevice(None)}: spotify_player::client: Trying to connect to device (id=6319cebd-10d2-416b-b61f-2935b9ba1498)
2023-08-06T20:11:23.314741Z  INFO spotify_player::streaming: Got an event from the integrated player: Started { play_request_id: 0, track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, position_ms: 7758 }
2023-08-06T20:11:23.314840Z  INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 0, track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, position_ms: 7758 }
2023-08-06T20:11:23.316402Z  INFO client_request{request=ConnectDevice(None)}: spotify_player::client: Connection succeeded (device_id=6319cebd-10d2-416b-b61f-2935b9ba1498)!
2023-08-06T20:11:23.316478Z  INFO client_request{request=ConnectDevice(None)}: spotify_player::client: successfully handled the client request, took: 1535ms
2023-08-06T20:11:23.637467Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 322ms
2023-08-06T20:11:23.650568Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 335ms
2023-08-06T20:11:23.978900Z  INFO client_request{request=GetUserSavedTracks}: spotify_player::client: successfully handled the client request, took: 2198ms
2023-08-06T20:11:25.355796Z  INFO spotify_player::streaming: Got an event from the integrated player: Paused { play_request_id: 0, track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, position_ms: 7757, duration_ms: 206501 }
2023-08-06T20:11:25.556385Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Cantigas Do Maio-José Afonso-cover.jpg
2023-08-06T20:11:25.556874Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Cantigas Do Maio-José Afonso-cover.jpg
2023-08-06T20:11:25.598204Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 242ms
2023-08-06T20:11:27.013228Z  INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")))), update the context state
2023-08-06T20:11:27.013411Z  INFO client_request{request=GetContext(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")))}: spotify_player::client: Get playlist context: spotify:playlist:37i9dQZEVXcLw3DgidKh4v
2023-08-06T20:11:27.277899Z  INFO client_request{request=GetContext(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")))}: spotify_player::client: successfully handled the client request, took: 264ms
2023-08-06T20:11:28.657833Z  INFO spotify_player::streaming: Got an event from the integrated player: Changed { old_track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, new_track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track } }
2023-08-06T20:11:28.657949Z  INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 1, track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track }, position_ms: 0 }
2023-08-06T20:11:28.871293Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Fashion Nugget-CAKE-cover.jpg
2023-08-06T20:11:28.871528Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Fashion Nugget-CAKE-cover.jpg
2023-08-06T20:11:28.892308Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 234ms
2023-08-06T20:11:28.909796Z  INFO client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")), Some(Uri("spotify:track:0EzT2QizrC4PqT0iQilP1A")))))}: spotify_player::client: successfully handled the client request, took: 625ms
2023-08-06T20:11:28.924188Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 265ms
2023-08-06T20:11:29.519479Z  INFO spotify_player::streaming: Got an event from the integrated player: Playing { play_request_id: 1, track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track }, position_ms: 0, duration_ms: 143413 }
2023-08-06T20:11:29.723530Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 203ms
2023-08-06T20:11:38.235325Z  INFO client_request{request=Player(Shuffle)}: spotify_player::client: successfully handled the client request, took: 383ms
2023-08-06T20:11:39.735993Z  INFO client_request{request=Player(Shuffle)}: spotify_player::client: successfully handled the client request, took: 284ms
2023-08-06T20:11:43.070556Z  INFO client_request{request=Player(NextTrack)}: spotify_player::client: successfully handled the client request, took: 274ms
2023-08-06T20:11:43.078361Z  INFO spotify_player::streaming: Got an event from the integrated player: Changed { old_track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track }, new_track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track } }
2023-08-06T20:11:43.078617Z  INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 2, track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track }, position_ms: 0 }
2023-08-06T20:11:43.274250Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from url: https://i.scdn.co/image/ab67616d0000b273733cfd7114c704785e4f8da0
2023-08-06T20:11:43.284474Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 205ms
2023-08-06T20:11:43.356632Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Saving the retrieved image into /home/mati/.cache/spotify-player/image/A Night At The Opera (Deluxe Edition 2011 Remaster)-Queen-cover.jpg
2023-08-06T20:11:43.357548Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/A Night At The Opera (Deluxe Edition 2011 Remaster)-Queen-cover.jpg
2023-08-06T20:11:43.390807Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 311ms
2023-08-06T20:11:43.901284Z  INFO spotify_player::streaming: Got an event from the integrated player: Playing { play_request_id: 2, track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track }, position_ms: 0, duration_ms: 223920 }
2023-08-06T20:11:44.247986Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 346ms
2023-08-06T20:11:55.062491Z  INFO client_request{request=Player(ResumePause)}: spotify_player::client: successfully handled the client request, took: 288ms
2023-08-06T20:11:55.112439Z  INFO spotify_player::streaming: Got an event from the integrated player: Paused { play_request_id: 2, track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track }, position_ms: 11802, duration_ms: 223920 }
2023-08-06T20:11:55.412717Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 299ms

Backtrace empty

Screenshots
image

Environment

  • OS: Debian
  • Application version: spotify_player 0.15.0
  • Application features: lyric-finder sixel notify

Additional context
I opened the app, selected the first song in my discover weekly, toggled shuffle false -> true -> false, then hit next, and received a song that is not even in the list

Originally created by @matilde-t on GitHub (Aug 6, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/232 **Describe the bug** Even if shuffle is set to false, songs in playlists are still random **To Reproduce** - set shuffle:false through `ctrl+s` - play next song through `n` **Expected behavior** Songs played in the order displayed in the playlist **Log and backtrace** ``` 2023-08-06T20:11:20.432587Z INFO spotify_player: General configurations: AppConfig { theme: "dracula", client_id: "65b708073fc0480ea92a077233ca87bd", client_port: 8080, copy_command: Command { command: "xclip", args: ["-sel", "c"] }, playback_format: "{track} • {artists}\n{album}\n{metadata}", notify_format: NotifyFormat { summary: "{track} • {artists}", body: "{album}" }, tracks_playback_limit: 50, proxy: None, ap_port: None, app_refresh_duration_in_ms: 32, playback_refresh_duration_in_ms: 0, cover_image_refresh_duration_in_ms: 2000, page_size_in_rows: 20, track_table_item_max_len: 32, play_icon: "▶", pause_icon: "▌▌", liked_icon: "♥", border_type: Plain, progress_bar_type: Rectangle, playback_window_position: Top, cover_img_length: 9, cover_img_width: 5, cover_img_scale: 1.0, playback_window_width: 6, enable_media_control: true, enable_streaming: true, enable_cover_image_cache: true, default_device: "spotify-player", device: DeviceConfig { name: "spotify-player", device_type: "speaker", volume: 50, bitrate: 160, audio_cache: false } } 2023-08-06T20:11:20.432663Z INFO spotify_player: Theme configurations: ThemeConfig { themes: [Theme { name: "default", palette: Palette { background: None, foreground: None, black: Color { color: Black }, blue: Color { color: LightBlue }, cyan: Color { color: LightCyan }, green: Color { color: LightGreen }, magenta: Color { color: LightMagenta }, red: Color { color: LightRed }, white: Color { color: Gray }, yellow: Color { color: LightYellow }, bright_black: Color { color: DarkGray }, bright_white: Color { color: White }, bright_red: Color { color: Red }, bright_magenta: Color { color: Magenta }, bright_green: Color { color: Green }, bright_cyan: Color { color: Cyan }, bright_blue: Color { color: Blue }, bright_yellow: Color { color: Yellow } }, component_style: ComponentStyle { block_title: None, border: None, playback_track: None, playback_artists: None, playback_album: None, playback_metadata: None, playback_progress_bar: None, current_playing: None, page_desc: None, table_header: None, selection: None } }] } 2023-08-06T20:11:20.432696Z INFO spotify_player: Keymap configurations: KeymapConfig { keymaps: [Keymap { key_sequence: KeySequence { keys: [None(Char('n'))] }, command: NextTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('p'))] }, command: PreviousTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('.'))] }, command: PlayRandom }, Keymap { key_sequence: KeySequence { keys: [None(Char(' '))] }, command: ResumePause }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('r'))] }, command: Repeat }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('s'))] }, command: Shuffle }, Keymap { key_sequence: KeySequence { keys: [None(Char('+'))] }, command: VolumeUp }, Keymap { key_sequence: KeySequence { keys: [None(Char('-'))] }, command: VolumeDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('>'))] }, command: SeekForward }, Keymap { key_sequence: KeySequence { keys: [None(Char('<'))] }, command: SeekBackward }, Keymap { key_sequence: KeySequence { keys: [None(Enter)] }, command: ChooseSelected }, Keymap { key_sequence: KeySequence { keys: [None(Char('r'))] }, command: RefreshPlayback }, Keymap { key_sequence: KeySequence { keys: [None(Char('/'))] }, command: Search }, Keymap { key_sequence: KeySequence { keys: [None(Char('z'))] }, command: Queue }, Keymap { key_sequence: KeySequence { keys: [None(Char('Z'))] }, command: AddSelectedItemToQueue }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char(' '))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('a'))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('a'))] }, command: ShowActionsOnCurrentTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('R'))] }, command: RestartIntegratedClient }, Keymap { key_sequence: KeySequence { keys: [None(Tab)] }, command: FocusNextWindow }, Keymap { key_sequence: KeySequence { keys: [None(BackTab)] }, command: FocusPreviousWindow }, Keymap { key_sequence: KeySequence { keys: [None(Char('T'))] }, command: SwitchTheme }, Keymap { key_sequence: KeySequence { keys: [None(Char('D'))] }, command: SwitchDevice }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('p'))] }, command: BrowseUserPlaylists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('a'))] }, command: BrowseUserFollowedArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('A'))] }, command: BrowseUserSavedAlbums }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char(' '))] }, command: CurrentlyPlayingContextPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('t'))] }, command: TopTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('r'))] }, command: RecentlyPlayedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('y'))] }, command: LikedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('L'))] }, command: LyricPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('l'))] }, command: LyricPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('l'))] }, command: LibraryPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] }, command: SearchPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('b'))] }, command: BrowsePage }, Keymap { key_sequence: KeySequence { keys: [None(Backspace)] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('q'))] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('?'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('h'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [None(Char('q'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('c'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [None(Esc)] }, command: ClosePopup }, Keymap { key_sequence: KeySequence { keys: [None(Char('j'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('n'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Down)] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('k'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('p'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(Up)] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageUp)] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('b'))] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageDown)] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('f'))] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('g'))] }, command: SelectFirstOrScrollToTop }, Keymap { key_sequence: KeySequence { keys: [None(Home)] }, command: SelectFirstOrScrollToTop }, Keymap { key_sequence: KeySequence { keys: [None(Char('G'))] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(End)] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('t'))] }, command: SortTrackByTitle }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('a'))] }, command: SortTrackByArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('A'))] }, command: SortTrackByAlbum }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('d'))] }, command: SortTrackByDuration }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('D'))] }, command: SortTrackByAddedDate }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('r'))] }, command: ReverseTrackOrder }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('k'))] }, command: MovePlaylistItemUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('j'))] }, command: MovePlaylistItemDown }] } 2023-08-06T20:11:21.122126Z INFO spotify_player::auth: Successfully used the cached credentials to create a new session! 2023-08-06T20:11:21.188140Z INFO spotify_player::token: Getting new authentication token... 2023-08-06T20:11:21.419133Z INFO spotify_player::token: Got new token: Token { access_token: "BQCC4fKBhwN3OL8fr4Oche9S5Uck8mZoxSBATkGs9QakRv03XLw_tXLhmYJwNUpLKgV3jnkXU8wAknCZenYrq48AYPIhD5vGXXgCCeEN3jAUR3iqMW2yaXIQtLSviT-aj1j2HAp0npDw-sNvfBRarcgGQaw254iSOO7cnpZWAXBL9ax_Kzyxu9-0fhp89ZICrWPmvRsrrXhp5dX3mZq3hFoYfk3-zj2YeKk5I7yOq-24h36OVYj5Y-F-FzvntTpGrJ7jPODas1_ERbInV6cKin-H1Zx44LL2nnk4tHOTL8YJJg", expires_in: Duration { secs: 3600, nanos: 0 }, expires_at: Some(2023-08-06T21:11:21.419120920Z), refresh_token: None, scopes: {} } 2023-08-06T20:11:21.419263Z INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, initial_volume: Some(32768), has_volume_ctrl: true, autoplay: false } 2023-08-06T20:11:21.419343Z INFO spotify_player::streaming: Initializing a new integrated player with device_id=6319cebd-10d2-416b-b61f-2935b9ba1498 2023-08-06T20:11:21.419600Z INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol 2023-08-06T20:11:21.720751Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 32768 } 2023-08-06T20:11:21.779885Z INFO spotify_player: No playback found on startup, trying to connect to an available device... 2023-08-06T20:11:21.780303Z INFO spotify_player::cli::client: Starting a client socket at 127.0.0.1:8080 2023-08-06T20:11:21.782256Z INFO spotify_player::media_control: Initializing application's media control event watcher... 2023-08-06T20:11:21.833656Z INFO client_request{request=GetCurrentUser}: spotify_player::client: successfully handled the client request, took: 52ms 2023-08-06T20:11:21.965689Z INFO client_request{request=GetUserPlaylists}: spotify_player::client: successfully handled the client request, took: 184ms 2023-08-06T20:11:22.170779Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 390ms 2023-08-06T20:11:22.212819Z INFO client_request{request=GetUserFollowedArtists}: spotify_player::client: successfully handled the client request, took: 431ms 2023-08-06T20:11:22.455603Z INFO client_request{request=GetUserSavedAlbums}: spotify_player::client: successfully handled the client request, took: 674ms 2023-08-06T20:11:22.835542Z INFO client_request{request=ConnectDevice(None)}: spotify_player::client: Available devices: [] 2023-08-06T20:11:22.835633Z INFO client_request{request=ConnectDevice(None)}: spotify_player::client: Trying to connect to device (id=6319cebd-10d2-416b-b61f-2935b9ba1498) 2023-08-06T20:11:23.314741Z INFO spotify_player::streaming: Got an event from the integrated player: Started { play_request_id: 0, track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, position_ms: 7758 } 2023-08-06T20:11:23.314840Z INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 0, track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, position_ms: 7758 } 2023-08-06T20:11:23.316402Z INFO client_request{request=ConnectDevice(None)}: spotify_player::client: Connection succeeded (device_id=6319cebd-10d2-416b-b61f-2935b9ba1498)! 2023-08-06T20:11:23.316478Z INFO client_request{request=ConnectDevice(None)}: spotify_player::client: successfully handled the client request, took: 1535ms 2023-08-06T20:11:23.637467Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 322ms 2023-08-06T20:11:23.650568Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 335ms 2023-08-06T20:11:23.978900Z INFO client_request{request=GetUserSavedTracks}: spotify_player::client: successfully handled the client request, took: 2198ms 2023-08-06T20:11:25.355796Z INFO spotify_player::streaming: Got an event from the integrated player: Paused { play_request_id: 0, track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, position_ms: 7757, duration_ms: 206501 } 2023-08-06T20:11:25.556385Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Cantigas Do Maio-José Afonso-cover.jpg 2023-08-06T20:11:25.556874Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Cantigas Do Maio-José Afonso-cover.jpg 2023-08-06T20:11:25.598204Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 242ms 2023-08-06T20:11:27.013228Z INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")))), update the context state 2023-08-06T20:11:27.013411Z INFO client_request{request=GetContext(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")))}: spotify_player::client: Get playlist context: spotify:playlist:37i9dQZEVXcLw3DgidKh4v 2023-08-06T20:11:27.277899Z INFO client_request{request=GetContext(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")))}: spotify_player::client: successfully handled the client request, took: 264ms 2023-08-06T20:11:28.657833Z INFO spotify_player::streaming: Got an event from the integrated player: Changed { old_track_id: SpotifyId { id: 37840766080861987513631867788935853728, audio_type: Track }, new_track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track } } 2023-08-06T20:11:28.657949Z INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 1, track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track }, position_ms: 0 } 2023-08-06T20:11:28.871293Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Fashion Nugget-CAKE-cover.jpg 2023-08-06T20:11:28.871528Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/Fashion Nugget-CAKE-cover.jpg 2023-08-06T20:11:28.892308Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 234ms 2023-08-06T20:11:28.909796Z INFO client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("37i9dQZEVXcLw3DgidKh4v")), Some(Uri("spotify:track:0EzT2QizrC4PqT0iQilP1A")))))}: spotify_player::client: successfully handled the client request, took: 625ms 2023-08-06T20:11:28.924188Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 265ms 2023-08-06T20:11:29.519479Z INFO spotify_player::streaming: Got an event from the integrated player: Playing { play_request_id: 1, track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track }, position_ms: 0, duration_ms: 143413 } 2023-08-06T20:11:29.723530Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 203ms 2023-08-06T20:11:38.235325Z INFO client_request{request=Player(Shuffle)}: spotify_player::client: successfully handled the client request, took: 383ms 2023-08-06T20:11:39.735993Z INFO client_request{request=Player(Shuffle)}: spotify_player::client: successfully handled the client request, took: 284ms 2023-08-06T20:11:43.070556Z INFO client_request{request=Player(NextTrack)}: spotify_player::client: successfully handled the client request, took: 274ms 2023-08-06T20:11:43.078361Z INFO spotify_player::streaming: Got an event from the integrated player: Changed { old_track_id: SpotifyId { id: 28584682711060872558224378174461209254, audio_type: Track }, new_track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track } } 2023-08-06T20:11:43.078617Z INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 2, track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track }, position_ms: 0 } 2023-08-06T20:11:43.274250Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from url: https://i.scdn.co/image/ab67616d0000b273733cfd7114c704785e4f8da0 2023-08-06T20:11:43.284474Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 205ms 2023-08-06T20:11:43.356632Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Saving the retrieved image into /home/mati/.cache/spotify-player/image/A Night At The Opera (Deluxe Edition 2011 Remaster)-Queen-cover.jpg 2023-08-06T20:11:43.357548Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: Retrieving an image from the file: /home/mati/.cache/spotify-player/image/A Night At The Opera (Deluxe Edition 2011 Remaster)-Queen-cover.jpg 2023-08-06T20:11:43.390807Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 311ms 2023-08-06T20:11:43.901284Z INFO spotify_player::streaming: Got an event from the integrated player: Playing { play_request_id: 2, track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track }, position_ms: 0, duration_ms: 223920 } 2023-08-06T20:11:44.247986Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 346ms 2023-08-06T20:11:55.062491Z INFO client_request{request=Player(ResumePause)}: spotify_player::client: successfully handled the client request, took: 288ms 2023-08-06T20:11:55.112439Z INFO spotify_player::streaming: Got an event from the integrated player: Paused { play_request_id: 2, track_id: SpotifyId { id: 121522897981761174711593510964180154338, audio_type: Track }, position_ms: 11802, duration_ms: 223920 } 2023-08-06T20:11:55.412717Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 299ms ``` Backtrace empty **Screenshots** ![image](https://github.com/aome510/spotify-player/assets/61622827/779a61d1-434a-4be4-b0fb-85f592b3228a) **Environment** - OS: Debian - Application version: spotify_player 0.15.0 - Application features: lyric-finder sixel notify **Additional context** I opened the app, selected the first song in my discover weekly, toggled shuffle false -> true -> false, then hit next, and received a song that is not even in the list
kerem 2026-03-14 13:14:28 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Aug 7, 2023):

Can reproduce this issue. Look like an issue with librespot integrated client as using shuffle with the official client works fine.

I found the only way to make the context in non-shuffle state is to start a playback with shuffle=false beforehand. If start a playback with shuffle=true, change shuffle=false doesn't work. But it starts with shuffle=false, change shuffle=true works. Quite interesting.

<!-- gh-comment-id:1667096719 --> @aome510 commented on GitHub (Aug 7, 2023): Can reproduce this issue. Look like an issue with `librespot` integrated client as using shuffle with the official client works fine. I found the only way to make the context in non-shuffle state is to start a playback with `shuffle=false` beforehand. If start a playback with `shuffle=true`, change `shuffle=false` doesn't work. But it starts with `shuffle=false`, change `shuffle=true` works. Quite interesting.
Author
Owner

@aome510 commented on GitHub (Aug 7, 2023):

Can reproduce this issue. Look like an issue with librespot integrated client as using shuffle with the official client works fine.

Found a discussion in https://github.com/librespot-org/librespot/issues/264.

IIUC, it's hard for the third-party library to implement "unshuffle" functionality because it doesn't know the initial state of the track order after shuffling.

I guess a workaround, for now, is the one I mentioned above: set the shuffle state to false then start the playback by choosing a track (ChooseSelected) or other commands.

I'll close this issue for now as nothing can be done from spotify_player side.

<!-- gh-comment-id:1668428020 --> @aome510 commented on GitHub (Aug 7, 2023): > Can reproduce this issue. Look like an issue with librespot integrated client as using shuffle with the official client works fine. Found a discussion in https://github.com/librespot-org/librespot/issues/264. IIUC, it's hard for the third-party library to implement "unshuffle" functionality because it doesn't know the initial state of the track order after shuffling. I guess a workaround, for now, is the one I mentioned above: set the shuffle state to `false` then start the playback by choosing a track (`ChooseSelected`) or other commands. I'll close this issue for now as nothing can be done from `spotify_player` side.
Author
Owner

@matilde-t commented on GitHub (Aug 7, 2023):

Can reproduce this issue. Look like an issue with librespot integrated client as using shuffle with the official client works fine.

I found the only way to make the context in non-shuffle state is to start a playback with shuffle=false beforehand. If start a playback with shuffle=true, change shuffle=false doesn't work. But it starts with shuffle=false, change shuffle=true works. Quite interesting.

For me it doesn't work if I start with shuffle=false either

<!-- gh-comment-id:1668552518 --> @matilde-t commented on GitHub (Aug 7, 2023): > Can reproduce this issue. Look like an issue with `librespot` integrated client as using shuffle with the official client works fine. > > I found the only way to make the context in non-shuffle state is to start a playback with `shuffle=false` beforehand. If start a playback with `shuffle=true`, change `shuffle=false` doesn't work. But it starts with `shuffle=false`, change `shuffle=true` works. Quite interesting. For me it doesn't work if I start with `shuffle=false` either
Author
Owner

@aome510 commented on GitHub (Aug 7, 2023):

Can reproduce this issue. Look like an issue with librespot integrated client as using shuffle with the official client works fine.
I found the only way to make the context in non-shuffle state is to start a playback with shuffle=false beforehand. If start a playback with shuffle=true, change shuffle=false doesn't work. But it starts with shuffle=false, change shuffle=true works. Quite interesting.

For me it doesn't work if I start with shuffle=false either

For all playlists or just the discover weekly? If doesn’t work for all, can you include a demonstration video?

<!-- gh-comment-id:1668649831 --> @aome510 commented on GitHub (Aug 7, 2023): > > Can reproduce this issue. Look like an issue with `librespot` integrated client as using shuffle with the official client works fine. > > I found the only way to make the context in non-shuffle state is to start a playback with `shuffle=false` beforehand. If start a playback with `shuffle=true`, change `shuffle=false` doesn't work. But it starts with `shuffle=false`, change `shuffle=true` works. Quite interesting. > > For me it doesn't work if I start with `shuffle=false` either For all playlists or just the discover weekly? If doesn’t work for all, can you include a demonstration video?
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/spotify-player#1053
No description provided.