[mpd] Return whole queue for command "playlistinfo" if given argument is

-1 (not a valid position in the queue)
This commit is contained in:
chme 2015-06-04 09:48:15 +02:00
parent 879c2ef350
commit 426e827712

View File

@ -1766,6 +1766,12 @@ mpd_command_playlistinfo(struct evbuffer *evbuf, int argc, char **argv, char **e
}
}
if (start_pos < 0)
{
DPRINTF(E_DBG, L_MPD, "Command 'playlistinfo' called with pos < 0 (arg = '%s'), ignore arguments and return whole queue\n", argv[1]);
start_pos = 0;
end_pos = -1;
}
queue = player_queue_get(start_pos, end_pos, 0);
if (!queue)