Skip to content
Snippets Groups Projects
Commit 057283f1 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix playback when previous track is removed

parent c998ba58
No related branches found
No related tags found
No related merge requests found
......@@ -327,10 +327,11 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
override fun onItemRemoved(index: Int, mrl: String?) {
if (BuildConfig.DEBUG) Log.i(TAG, "CustomMediaListItemDeleted")
val currentRemoved = currentIndex == index
if (currentIndex >= index && !expanding) --currentIndex
launch(UI, CoroutineStart.UNDISPATCHED) {
determinePrevAndNextIndices()
if (currentIndex == index && !expanding) {
if (currentRemoved && !expanding) {
when {
nextIndex != -1 -> next()
currentIndex != -1 -> playIndex(currentIndex, 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment