spotify / android-sdk

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

Impossible to start playback via skipToIndex if offset is bigger than track 150 on downloaded album #351

Open tobika opened 1 year ago

tobika commented 1 year ago

Issue found on 04/11/2023.

SDK Version: 0.8.0

OS Version: android 9 - 13

Scope(s): ['streaming', 'user-read-birthdate', 'user-read-email', 'user-read-private', 'app-remote-control', 'user-read-playback-state', 'user-modify-playback-state']

Steps to reproduce:

  1. Use skipToIndex on a big album with an offset >= 150 and the album available offline in the spotify app

Expected behaviour:

Playback

Actual behaviour:

No playback

Hello I'd like to report this very particular bug in the spotify android sdk.

My App plays audiobook that often have more than 150 tracks in one album. Since a few days/weeks? If I start an album via skipToIndex with an offset equal or bigger than 150 nothing happens, but "only" if the album has been made available offline. Once you delete de offline files in Spotify the playback works as expected.

In the logs nothing happens. I only get an empty playerstate:

PlayerState{track=null, isPaused=false, playbackSpeed=0.0, playbackPosition=0, playbackOptions=PlayerOptions{isShuffling=false, repeatMode=0}, playbackRestrictions=PlayerRestrictions{canSkipNext=false, canSkipPrev=false, canRepeatTrack=true, canRepeatContext=true, canToggleShuffle=true}}

I'm using the following album for testing: spotify:album:3LDLq0RSKzAywbv3DOcSzn at offset 150

I have an App in the play store with enought users that I already got a lot of emails signaling this bug to the app: https://play.google.com/store/apps/details?id=com.tobik.audiobookspotify

Would be great if there could be a fix. For the moment I recommend not making the album available offline as a workaround.