Fixed skipping tracks on playback error. The faulty track is now removed from the queue.
This commit is contained in:
parent
97b7dc2a61
commit
54f911793a
|
@ -396,8 +396,10 @@ class PlayerService : Service() {
|
||||||
override fun onPlayerError(error: ExoPlaybackException?) {
|
override fun onPlayerError(error: ExoPlaybackException?) {
|
||||||
EventBus.send(Event.PlaybackError(getString(R.string.error_playback)))
|
EventBus.send(Event.PlaybackError(getString(R.string.error_playback)))
|
||||||
|
|
||||||
player.next()
|
queue.current()?.let {
|
||||||
player.playWhenReady = true
|
queue.remove(it)
|
||||||
|
player.prepare(queue.datasources)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue