playback: re-add semi-circular queue w/no repeat

This commit is contained in:
Alexander Capehart 2024-01-16 12:46:26 -07:00
parent 76eb693fb5
commit ec61ba50ec
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -315,9 +315,21 @@ class PlaybackService :
} }
override fun next() { override fun next() {
player.seekToNext() // Replicate the old pseudo-circular queue behavior when no repeat option is implemented.
if (!playbackSettings.rememberPause) { // Basically, you can't skip back and wrap around the queue, but you can skip forward and
player.play() // wrap around the queue, albeit playback will be paused.
if (player.repeatMode != Player.REPEAT_MODE_OFF || player.hasNextMediaItem()) {
player.seekToNext()
if (!playbackSettings.rememberPause) {
player.play()
}
} else {
goto(0)
// TODO: Dislike the UX implications of this, I feel should I bite the bullet
// and switch to dynamic skip enable/disable?
if (!playbackSettings.rememberPause) {
player.pause()
}
} }
playbackManager.ack(this, StateAck.IndexMoved) playbackManager.ack(this, StateAck.IndexMoved)
// Deferred save is handled on position discontinuity // Deferred save is handled on position discontinuity