mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
Switch to using db_query_fetch_string_sort() in daap_reply_browse()
This commit is contained in:
parent
e226c38d4f
commit
4dce6390ea
@ -2451,6 +2451,7 @@ daap_reply_browse(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
|
|||||||
struct evbuffer *itemlist;
|
struct evbuffer *itemlist;
|
||||||
struct sort_ctx *sctx;
|
struct sort_ctx *sctx;
|
||||||
char *browse_item;
|
char *browse_item;
|
||||||
|
char *sort_item;
|
||||||
char *tag;
|
char *tag;
|
||||||
int sort_headers;
|
int sort_headers;
|
||||||
int nitems;
|
int nitems;
|
||||||
@ -2556,13 +2557,13 @@ daap_reply_browse(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
|
|||||||
}
|
}
|
||||||
|
|
||||||
nitems = 0;
|
nitems = 0;
|
||||||
while (((ret = db_query_fetch_string(&qp, &browse_item)) == 0) && (browse_item))
|
while (((ret = db_query_fetch_string_sort(&qp, &browse_item, &sort_item)) == 0) && (browse_item))
|
||||||
{
|
{
|
||||||
nitems++;
|
nitems++;
|
||||||
|
|
||||||
if (sort_headers)
|
if (sort_headers)
|
||||||
{
|
{
|
||||||
ret = daap_sort_build(sctx, browse_item);
|
ret = daap_sort_build(sctx, sort_item);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DAAP, "Could not add sort header to DAAP browse reply\n");
|
DPRINTF(E_LOG, L_DAAP, "Could not add sort header to DAAP browse reply\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user