spotify / android-sdk

Spotify SDK for Android
https://developer.spotify.com/documentation/android/
Apache License 2.0
454 stars 117 forks source link

PlayerOptions.isShuffling is always false #337

Open hufman opened 1 year ago

hufman commented 1 year ago

Thanks for your interest in the Spotify App Remote SDK! If you're submitting a bug, please use the following template. If your issue is a feature request, please include your use-case so that we have all the necessary info.

Issue found on October 22, 2022 seemingly starting with Spotify 8.7.72.546.

SDK Version:

0.7.2

OS Version:

Multiple, Android 10-13

Scope(s):

App Control PlayerState

Steps to reproduce:

  1. Subscribe to PlayerState and watch the playerState.isShuffling property:
    SpotifyAppRemote().playerApi.subscribeToPlayerState().setEventCallback { playerState ->
    println(playerState.playbackOptions.isShuffling)
    }
  2. Toggle the Shuffle button within Spotify UI.

Expected behaviour:

When the Shuffle button in Spotify is enabled (green) to represent when Spotify is shuffling tracks, playerState.isShuffling should be true and not false.

Actual behaviour:

With some regional variation, it seems that Spotify ~8.7.72.546 no longer sets playerState.isShuffling:true when the Spotify app has shuffle enabled.

This makes it impossible for a custom Spotify UI to show whether Spotify is shuffling, and it breaks Toggle Shuffle functionality.

hufman commented 1 year ago

It might be related to this bug in the client. It does appear that the repeatMode always shows 0 too.

hufman commented 1 year ago

This seems to be fixed as of (at least) Spotify 8.8.12.545