From f85df07308a0436488764cc67c7a123c2550842e Mon Sep 17 00:00:00 2001 From: chme Date: Sat, 23 Feb 2019 10:58:04 +0100 Subject: [PATCH] [jsonapi] Respect order defined in smartpl expression in queue/items/add --- src/httpd_jsonapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/httpd_jsonapi.c b/src/httpd_jsonapi.c index 74f39b2c..a2cad527 100644 --- a/src/httpd_jsonapi.c +++ b/src/httpd_jsonapi.c @@ -1905,13 +1905,14 @@ queue_tracks_add_byexpression(const char *param, int pos, int *total_count) return -1; query_params.filter = strdup(smartpl_expression.query_where); + query_params.order = safe_strdup(smartpl_expression.order); free_smartpl(&smartpl_expression, 1); player_get_status(&status); ret = db_queue_add_by_query(&query_params, status.shuffle, status.item_id, pos, total_count, NULL); - free(query_params.filter); + free_query_params(&query_params, 1); return ret;