From 48526c2ab7a23d7ad03b3a0e4558722bba27ad4b Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Sat, 9 Nov 2019 15:58:45 +0000 Subject: [PATCH] [dacp] bug fix - play item from 'up next' when stopped --- src/httpd_dacp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/httpd_dacp.c b/src/httpd_dacp.c index 8822bfda..bee56149 100644 --- a/src/httpd_dacp.c +++ b/src/httpd_dacp.c @@ -1296,10 +1296,10 @@ dacp_reply_cue_play(struct httpd_request *hreq) else { /* Play from Up Next queue */ - if (status.status == PLAY_STOPPED && pos > 0) - pos--; - - queue_item = db_queue_fetch_byposrelativetoitem(pos, status.item_id, status.shuffle); + if (status.status == PLAY_STOPPED) + queue_item = db_queue_fetch_bypos(pos, status.shuffle); + else + queue_item = db_queue_fetch_byposrelativetoitem(pos, status.item_id, status.shuffle); if (!queue_item) { DPRINTF(E_LOG, L_DACP, "Could not fetch item from queue: pos=%d, now playing=%d\n", pos, status.item_id);