summaryrefslogtreecommitdiff
path: root/src/queue
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-02 16:25:32 +0100
committerMax Kellermann <max@musicpd.org>2017-12-02 16:25:32 +0100
commit4a3059f50969fd84ad6d1a0a51b46cd1e86db928 (patch)
tree97aca60c8513e998fe6a69ce753eb1caea2e96af /src/queue
parent78728138a04c2493c6bfadee98060043eca204bf (diff)
queue/PlaylistControl: don't skip highest priority song on "play"
When starting playback with a specific song which does not have the highest priority, the previous highest priority song was skipped completely because its order was "swapped". This commit changes to a more expensive operation which inserts the selected song into the order list. This fixes a small part of #165
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/PlaylistControl.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/queue/PlaylistControl.cxx b/src/queue/PlaylistControl.cxx
index 4b17386ae..018ddcbb7 100644
--- a/src/queue/PlaylistControl.cxx
+++ b/src/queue/PlaylistControl.cxx
@@ -75,8 +75,7 @@ playlist::MoveOrderToCurrent(unsigned old_order)
} else {
/* not playing anything: move the specified song to
the front */
- queue.SwapOrders(old_order, 0);
- return 0;
+ return queue.MoveOrderBefore(old_order, 0);
}
}