mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
Handle sort parameter in DAAP queries
This is used by Remote for the Title view.
This commit is contained in:
parent
5d69a8e34c
commit
ca72ee5926
13
src/httpd_daap.c
Normal file → Executable file
13
src/httpd_daap.c
Normal file → Executable file
@ -902,6 +902,19 @@ get_query_params(struct evkeyvalq *query, struct query_params *qp)
|
|||||||
qp->idx_type = I_SUB;
|
qp->idx_type = I_SUB;
|
||||||
|
|
||||||
qp->sort = S_NONE;
|
qp->sort = S_NONE;
|
||||||
|
param = evhttp_find_header(query, "sort");
|
||||||
|
if (param)
|
||||||
|
{
|
||||||
|
if (strcmp(param, "name") == 0)
|
||||||
|
qp->sort = S_NAME;
|
||||||
|
else if (strcmp(param, "album") == 0)
|
||||||
|
qp->sort = S_ALBUM;
|
||||||
|
else
|
||||||
|
DPRINTF(E_DBG, L_DAAP, "Unknown sort param: %s\n", param);
|
||||||
|
|
||||||
|
if (qp->sort != S_NONE)
|
||||||
|
DPRINTF(E_DBG, L_DAAP, "Sorting songlist by %s\n", param);
|
||||||
|
}
|
||||||
|
|
||||||
param = evhttp_find_header(query, "query");
|
param = evhttp_find_header(query, "query");
|
||||||
if (!param)
|
if (!param)
|
||||||
|
Loading…
Reference in New Issue
Block a user