Commit 057283f1 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix playback when previous track is removed

parent c998ba58
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment