summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-08-13 16:25:47 +1000
committerjacqueline <me@jacqueline.id.au>2024-08-13 16:25:47 +1000
commit326cc42a63ec1bd8ff4e62da44658e8facd181c2 (patch)
tree050ee4abc27d9bff8c2e8a0aa75a04ae33db6107
parentff7468635f9b61b20f48bf5fd01878a17f5d8435 (diff)
downloadtangara-fw-326cc42a63ec1bd8ff4e62da44658e8facd181c2.tar.gz
Don't spuriously report that the current track has changed
Fixes the last track in the queue repeating forever
-rw-r--r--src/tangara/audio/track_queue.cpp4
1 files changed, 4 insertions, 0 deletions
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<std::shared_mutex> 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);