[dacp] Only return requested number of queue item (fixes #556)

This commit is contained in:
chme 2018-09-13 21:11:41 +02:00
parent 2c1f2f1b15
commit 3ca5402638

View File

@ -1749,8 +1749,7 @@ dacp_reply_playqueuecontents(struct httpd_request *hreq)
if (ret < 0)
goto error;
//FIXME [queue] Check count value
while ((db_queue_enum_fetch(&qp, &queue_item) == 0) && (queue_item.id > 0))
while ((db_queue_enum_fetch(&qp, &queue_item) == 0) && (queue_item.id > 0) && (count < span))
{
if (status.item_id == 0 || status.item_id == queue_item.id)
{