mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 07:35:57 -05:00
Support clear-first in cue play command
This commit is contained in:
parent
0df4ab4555
commit
5674314161
@ -727,10 +727,25 @@ dacp_reply_cue_play(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
||||
const char *cuequery;
|
||||
const char *param;
|
||||
uint32_t id;
|
||||
int clear;
|
||||
int ret;
|
||||
|
||||
/* /cue?command=play&query=...&sort=...&index=N */
|
||||
|
||||
param = evhttp_find_header(query, "clear-first");
|
||||
if (param)
|
||||
{
|
||||
ret = safe_atoi32(param, &clear);
|
||||
if (ret < 0)
|
||||
DPRINTF(E_LOG, L_DACP, "Invalid clear-first value in cue request\n");
|
||||
else if (clear)
|
||||
{
|
||||
player_playback_stop();
|
||||
|
||||
player_queue_clear();
|
||||
}
|
||||
}
|
||||
|
||||
cuequery = evhttp_find_header(query, "query");
|
||||
if (cuequery)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user