mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
Wire up pause and playpause
This commit is contained in:
parent
f5e84d6950
commit
b4a5ba6f3c
@ -423,7 +423,7 @@ dacp_reply_pause(struct evhttp_request *req, struct evbuffer *evbuf, char **uri,
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
/* TODO */
|
||||
player_playback_pause();
|
||||
|
||||
/* 204 No Content is the canonical reply */
|
||||
evhttp_send_reply(req, HTTP_NOCONTENT, "No Content", evbuf);
|
||||
@ -433,12 +433,20 @@ static void
|
||||
dacp_reply_playpause(struct evhttp_request *req, struct evbuffer *evbuf, char **uri, struct evkeyvalq *query)
|
||||
{
|
||||
struct daap_session *s;
|
||||
int ret;
|
||||
|
||||
s = daap_session_find(req, query, evbuf);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
/* TODO */
|
||||
ret = player_playback_start(NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_DACP, "Player returned an error for start after pause\n");
|
||||
|
||||
evhttp_send_error(req, 500, "Internal Server Error");
|
||||
return;
|
||||
}
|
||||
|
||||
/* 204 No Content is the canonical reply */
|
||||
evhttp_send_reply(req, HTTP_NOCONTENT, "No Content", evbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user