[dacp] Fix playing from history for Remote

This commit is contained in:
chme 2015-10-31 06:18:05 +01:00
parent 43893dff48
commit c2ba2f6779

View File

@ -1044,9 +1044,9 @@ dacp_reply_cue_play(struct evhttp_request *req, struct evbuffer *evbuf, char **u
hist = 0; hist = 0;
if ((param = evhttp_find_header(query, "command")) && (strcmp(param, "playnow") == 0)) if ((param = evhttp_find_header(query, "command")) && (strcmp(param, "playnow") == 0))
{ {
/* If mode parameter is -1, the index is relative to the history queue, otherwise to the Up Next queue */ /* If mode parameter is -1 or 1, the index is relative to the history queue, otherwise to the Up Next queue */
param = evhttp_find_header(query, "mode"); param = evhttp_find_header(query, "mode");
if (param && (strcmp(param, "-1") == 0)) if (param && ((strcmp(param, "-1") == 0) || (strcmp(param, "1") == 0)))
{ {
/* Play from history queue */ /* Play from history queue */
hist = 1; hist = 1;