mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 07:53:23 -05:00
Fix "play next" command - the queue was not circular anymore due the
missing setting of pl_prev of the next song and start the shuffle-queue with ps_shuffle
This commit is contained in:
parent
7640349cf6
commit
eab4c1c3d2
16
src/player.c
16
src/player.c
@ -3374,14 +3374,18 @@ queue_add_next(struct player_command *cmd)
|
||||
if (source_head)
|
||||
{
|
||||
ps_playing = cur_playing ? cur_playing : cur_streaming;
|
||||
ps_tail = ps->pl_prev;
|
||||
|
||||
ps_tail->pl_next = ps_playing->pl_next;
|
||||
ps_tail->shuffle_next = ps_playing->shuffle_next;
|
||||
ps_playing->pl_next = ps;
|
||||
ps_playing->shuffle_next = ps;
|
||||
// Insert ps after ps_playing
|
||||
ps->pl_prev->pl_next = ps_playing->pl_next;
|
||||
ps_playing->pl_next->pl_prev = ps->pl_prev;
|
||||
ps->pl_prev = ps_playing;
|
||||
ps->shuffle_prev = ps_playing;
|
||||
ps_playing->pl_next = ps;
|
||||
|
||||
// Insert ps_shuffle after ps_playing
|
||||
ps_shuffle->shuffle_prev->shuffle_next = ps_playing->shuffle_next;
|
||||
ps_playing->shuffle_next->shuffle_prev = ps_shuffle->shuffle_prev;
|
||||
ps_shuffle->shuffle_prev = ps_playing;
|
||||
ps_playing->shuffle_next = ps_shuffle;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user