Skip to content

Commit

Permalink
playback: re-add semi-circular queue w/no repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt committed Jan 16, 2024
1 parent 76eb693 commit ec61ba5
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,21 @@ class PlaybackService :
}

override fun next() {
player.seekToNext()
if (!playbackSettings.rememberPause) {
player.play()
// Replicate the old pseudo-circular queue behavior when no repeat option is implemented.
// Basically, you can't skip back and wrap around the queue, but you can skip forward and
// 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)
// Deferred save is handled on position discontinuity
Expand Down

0 comments on commit ec61ba5

Please sign in to comment.