mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
Implement sort=artist for DAAP queries
This commit is contained in:
parent
ee7b976eeb
commit
e5af78fe9f
1
src/db.c
1
src/db.c
@ -247,6 +247,7 @@ static const char *sort_clause[] =
|
||||
"",
|
||||
"ORDER BY title COLLATE DAAP ASC",
|
||||
"ORDER BY album COLLATE DAAP ASC, disc ASC, track ASC",
|
||||
"ORDER BY artist COLLATE DAAP ASC",
|
||||
};
|
||||
|
||||
static char *db_path;
|
||||
|
1
src/db.h
1
src/db.h
@ -20,6 +20,7 @@ enum sort_type {
|
||||
S_NONE = 0,
|
||||
S_NAME,
|
||||
S_ALBUM,
|
||||
S_ARTIST,
|
||||
};
|
||||
|
||||
#define Q_F_BROWSE (1 << 15)
|
||||
|
@ -1058,6 +1058,8 @@ get_query_params(struct evkeyvalq *query, int *sort_headers, struct query_params
|
||||
qp->sort = S_NAME;
|
||||
else if (strcmp(param, "album") == 0)
|
||||
qp->sort = S_ALBUM;
|
||||
else if (strcmp(param, "artist") == 0)
|
||||
qp->sort = S_ARTIST;
|
||||
else
|
||||
DPRINTF(E_DBG, L_DAAP, "Unknown sort param: %s\n", param);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user