mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-10 13:18:14 -05:00
Accept item-spec in playspec requests
This commit is contained in:
parent
eb1e827f1d
commit
c70496bb58
@ -841,7 +841,9 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* /ctrl-int/1/playspec?database-spec='dmap.persistentid:0x1'&container-spec='dmap.persistentid:0x5'&container-item-spec='dmap.containeritemid:0x9'
|
/* /ctrl-int/1/playspec?database-spec='dmap.persistentid:0x1'&container-spec='dmap.persistentid:0x5'&container-item-spec='dmap.containeritemid:0x9'
|
||||||
* With our DAAP implementation, container-spec is the playlist ID and container-item-spec is the song ID
|
* or (Apple Remote when playing a Podcast)
|
||||||
|
* /ctrl-int/1/playspec?database-spec='dmap.persistentid:0x1'&container-spec='dmap.persistentid:0x5'&item-spec='dmap.itemid:0x9'
|
||||||
|
* With our DAAP implementation, container-spec is the playlist ID and container-item-spec/item-spec is the song ID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
s = daap_session_find(req, query, evbuf);
|
s = daap_session_find(req, query, evbuf);
|
||||||
@ -881,9 +883,11 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
|||||||
{
|
{
|
||||||
/* Start song ID */
|
/* Start song ID */
|
||||||
param = evhttp_find_header(query, "container-item-spec");
|
param = evhttp_find_header(query, "container-item-spec");
|
||||||
|
if (!param)
|
||||||
|
param = evhttp_find_header(query, "item-spec");
|
||||||
if (!param)
|
if (!param)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DACP, "No container-item-spec in playspec request\n");
|
DPRINTF(E_LOG, L_DACP, "No container-item-spec/item-spec in playspec request\n");
|
||||||
|
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
}
|
}
|
||||||
@ -891,7 +895,7 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
|||||||
param = strchr(param, ':');
|
param = strchr(param, ':');
|
||||||
if (!param)
|
if (!param)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DACP, "Malformed container-item-spec parameter in playspec request\n");
|
DPRINTF(E_LOG, L_DACP, "Malformed container-item-spec/item-spec parameter in playspec request\n");
|
||||||
|
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
}
|
}
|
||||||
@ -900,7 +904,7 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
|||||||
ret = safe_hextou32(param, &id);
|
ret = safe_hextou32(param, &id);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DACP, "Couldn't convert container-item-spec to an integer in playspec (%s)\n", param);
|
DPRINTF(E_LOG, L_DACP, "Couldn't convert container-item-spec/item-spec to an integer in playspec (%s)\n", param);
|
||||||
|
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user