From 2b7ff60771f4a9ba8d769349335175044a1e05f2 Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 2 Dec 2018 07:14:26 +0100 Subject: [PATCH] [jsonapi] Fix playing from position if player state is shuffled --- src/httpd_jsonapi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/httpd_jsonapi.c b/src/httpd_jsonapi.c index 6bb7f611..43447571 100644 --- a/src/httpd_jsonapi.c +++ b/src/httpd_jsonapi.c @@ -1327,6 +1327,7 @@ static int play_item_at_position(const char *param) { uint32_t position; + struct player_status status; struct db_queue_item *queue_item; int ret; @@ -1338,7 +1339,9 @@ play_item_at_position(const char *param) return HTTP_BADREQUEST; } - queue_item = db_queue_fetch_bypos(position, 0); + player_get_status(&status); + + queue_item = db_queue_fetch_bypos(position, status.shuffle); if (!queue_item) { DPRINTF(E_LOG, L_WEB, "No queue item at position '%d'\n", position);