Commit 8e99ace4 authored by Geoffrey Métais's avatar Geoffrey Métais

Don't determine next index during media transition

parent ae7ef700
...@@ -671,11 +671,8 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList ...@@ -671,11 +671,8 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
MediaPlayer.Event.EndReached -> { MediaPlayer.Event.EndReached -> {
saveMediaMeta() saveMediaMeta()
if (isBenchmark) player.setPreviousStats() if (isBenchmark) player.setPreviousStats()
launch(UI, CoroutineStart.UNDISPATCHED) { if (nextIndex == -1) savePosition(true)
determinePrevAndNextIndices(true) next()
if (nextIndex == -1) savePosition(true)
next()
}
} }
MediaPlayer.Event.EncounteredError -> { MediaPlayer.Event.EncounteredError -> {
service.showToast(service.getString( service.showToast(service.getString(
......
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