spotify / android-sdk

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

Podcast contentApi.getChildrenOfItem and playerApi.skipToIndex behave incorrectly #267

Open hufman opened 4 years ago

hufman commented 4 years 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 2020-08-10.

SDK Version:

spotify-app-remote-release-0.7.0

OS Version:

Android 10

Scope(s):

App Remote Podcast playlist support


Incorrect podcast queue:

Steps to reproduce:

val desiredPodcast = ListItem("spotify:show:4XPl3uEEL9hvqMkoZrzbx5", "spotify:show:4XPl3uEEL9hvqMkoZrzbx5", null, "", "", false, true)
SpotifyAppController().contentApi.getChildrenOfItem(desiredPodcast, 100, 0).setResultCallback { listItems ->
    println(listItems.total)
}

Expected behaviour:

The ListItems that arrives at the ResultCallback should have all of the episodes of the podcast, up to the requested 100 perpage size.

Actual behaviour:

The ListItems that arrives at the ResultCallback only has the latest 30 items (sorted newest-to-oldest) out of the total size of 71, and the ListItems.total only claims 30 exist. However, the pagination request asked for 100 perpage and the Spotify app shows (currently) 71 episodes.


Incorrect podcast skipToIndex behavior:

Steps to reproduce:

SpotifyAppController().playerApi.skipToIndex("spotify:show:4XPl3uEEL9hvqMkoZrzbx5", 5)

Expected behaviour:

From the list of items from the getChildrenOfItem call, it should play the 6th item (because the first item would be index 0). Podcasts seem to be sorted newest-to-oldest, so this should start playing the 6th-newest item (currently 66 from this podcast of 71 items)

Actual behaviour:

It actually plays the 1st, earliest, episode of the podcast.