From 426e82771297a83d6b14455679a4a41f4e11566c Mon Sep 17 00:00:00 2001 From: chme Date: Thu, 4 Jun 2015 09:48:15 +0200 Subject: [PATCH] [mpd] Return whole queue for command "playlistinfo" if given argument is -1 (not a valid position in the queue) --- src/mpd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mpd.c b/src/mpd.c index 9c0b28ed..c393520d 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -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)