Fix bug where calling TrackQueue's next() repeatedly would increase the position despite running off the end of the queue.

custom
Robin Howard 1 year ago committed by Robin Howard
parent 3f1fadbeef
commit 429abd1237
  1. 7
      src/audio/track_queue.cpp

@ -200,10 +200,13 @@ auto TrackQueue::next() -> void {
shuffle_->next(); shuffle_->next();
pos_ = shuffle_->current(); pos_ = shuffle_->current();
} else { } else {
pos_++; if (pos_ + 1 >= tracks_.size()) {
if (pos_ >= tracks_.size() && repeat_) { if (repeat_) {
pos_ = 0; pos_ = 0;
} }
} else {
pos_++;
}
} }
notifyChanged(true); notifyChanged(true);

Loading…
Cancel
Save