mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-15 00:35:03 -05:00
[mpd] Return whole queue for command "playlistinfo" if given argument is
-1 (not a valid position in the queue)
This commit is contained in:
parent
879c2ef350
commit
426e827712
@ -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);
|
queue = player_queue_get(start_pos, end_pos, 0);
|
||||||
|
|
||||||
if (!queue)
|
if (!queue)
|
||||||
|
Loading…
Reference in New Issue
Block a user