From 326cc42a63ec1bd8ff4e62da44658e8facd181c2 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 13 Aug 2024 16:25:47 +1000 Subject: [PATCH] Don't spuriously report that the current track has changed Fixes the last track in the queue repeating forever --- src/tangara/audio/track_queue.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tangara/audio/track_queue.cpp b/src/tangara/audio/track_queue.cpp index 91bdda39..5d730a09 100644 --- a/src/tangara/audio/track_queue.cpp +++ b/src/tangara/audio/track_queue.cpp @@ -242,6 +242,8 @@ auto TrackQueue::next(Reason r) -> void { { const std::unique_lock lock(mutex_); + auto pos = position_; + if (shuffle_) { shuffle_->next(); position_ = shuffle_->current(); @@ -250,7 +252,9 @@ auto TrackQueue::next(Reason r) -> void { position_++; } } + goTo(position_); + changed = pos != position_; } notifyChanged(changed, r);