diff options
Diffstat (limited to '')
-rw-r--r-- | src/queue/Playlist.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/queue/Playlist.cxx b/src/queue/Playlist.cxx index abcb2ceaa..b2fd673b4 100644 --- a/src/queue/Playlist.cxx +++ b/src/queue/Playlist.cxx @@ -99,6 +99,12 @@ playlist::UpdateQueuedSong(PlayerControl &pc, const DetachedSong *prev) if (!playing) return; + if (prev == nullptr && bulk_edit) + /* postponed until CommitBulk() to avoid always + queueing the first song that is being added (in + random mode) */ + return; + assert(!queue.IsEmpty()); assert((queued < 0) == (prev == nullptr)); @@ -286,7 +292,9 @@ playlist::SetRandom(PlayerControl &pc, bool status) if (queue.random) { /* shuffle the queue order, but preserve current */ - const int current_position = GetCurrentPosition(); + const int current_position = playing + ? GetCurrentPosition() + : -1; queue.ShuffleOrder(); |