Browse Source

Fixed skipping tracks on playback error. The faulty track is now removed from the queue.

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
54f911793a
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 6
      app/src/main/java/com/github/apognu/otter/playback/PlayerService.kt

6
app/src/main/java/com/github/apognu/otter/playback/PlayerService.kt

@ -396,8 +396,10 @@ class PlayerService : Service() { @@ -396,8 +396,10 @@ class PlayerService : Service() {
override fun onPlayerError(error: ExoPlaybackException?) {
EventBus.send(Event.PlaybackError(getString(R.string.error_playback)))
player.next()
player.playWhenReady = true
queue.current()?.let {
queue.remove(it)
player.prepare(queue.datasources)
}
}
}

Loading…
Cancel
Save