mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-13 07:50:41 -04:00
[db] fixup
This commit is contained in:
parent
edc609b531
commit
d339f5bcd2
4
src/db.c
4
src/db.c
@ -4553,14 +4553,14 @@ db_queue_add_by_fileid(int id, char reshuffle, uint32_t item_id)
|
|||||||
static int
|
static int
|
||||||
queue_enum_start(struct query_params *query_params)
|
queue_enum_start(struct query_params *query_params)
|
||||||
{
|
{
|
||||||
#define Q_TMPL "SELECT * FROM queue WHERE %s ORDER BY %s;"
|
#define Q_TMPL "SELECT * FROM queue WHERE %s %s;"
|
||||||
char *query;
|
char *query;
|
||||||
const char *orderby;
|
const char *orderby;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
query_params->stmt = NULL;
|
query_params->stmt = NULL;
|
||||||
|
|
||||||
if (query_params)
|
if (query_params->sort)
|
||||||
orderby = sort_clause[query_params->sort];
|
orderby = sort_clause[query_params->sort];
|
||||||
else
|
else
|
||||||
orderby = sort_clause[S_POS];
|
orderby = sort_clause[S_POS];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user