mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 16:48:22 -04:00
Rename make_queue functions
This commit is contained in:
parent
064dfef2de
commit
100e08da9d
@ -822,7 +822,7 @@ find_first_song_id(const char *query)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
make_queue_for_query(struct queue_item **head, const char *query, const char *queuefilter, const char *sort, int quirk)
|
make_queue_byquery(struct queue_item **head, const char *query, const char *queuefilter, const char *sort, int quirk)
|
||||||
{
|
{
|
||||||
struct media_file_info *mfi;
|
struct media_file_info *mfi;
|
||||||
struct query_params qp;
|
struct query_params qp;
|
||||||
@ -994,7 +994,7 @@ dacp_reply_cue_play(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
|||||||
{
|
{
|
||||||
sort = evhttp_find_header(query, "sort");
|
sort = evhttp_find_header(query, "sort");
|
||||||
|
|
||||||
ret = make_queue_for_query(&items, cuequery, NULL, sort, 0);
|
ret = make_queue_byquery(&items, cuequery, NULL, sort, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DACP, "Could not build song queue\n");
|
DPRINTF(E_LOG, L_DACP, "Could not build song queue\n");
|
||||||
@ -1060,7 +1060,7 @@ dacp_reply_cue_play(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
|||||||
|
|
||||||
/* If playing from history queue, the pos holds the id of the item to play */
|
/* If playing from history queue, the pos holds the id of the item to play */
|
||||||
if (hist)
|
if (hist)
|
||||||
ret = player_playback_start_byitemid(id, &id);
|
ret = player_playback_start_byitemid(id, &id); //TODO [queue/history] id does not hold the queueitemid but the dbmfiid
|
||||||
else
|
else
|
||||||
ret = player_playback_start_bypos(pos, &id);
|
ret = player_playback_start_bypos(pos, &id);
|
||||||
|
|
||||||
@ -1730,7 +1730,7 @@ dacp_reply_playqueueedit_add(struct evhttp_request *req, struct evbuffer *evbuf,
|
|||||||
if (!querymodifier || (strcmp(querymodifier, "containers") != 0))
|
if (!querymodifier || (strcmp(querymodifier, "containers") != 0))
|
||||||
{
|
{
|
||||||
quirkyquery = (mode == 1) && strstr(editquery, "dmap.itemid:") && ((!queuefilter) || strstr(queuefilter, "(null)"));
|
quirkyquery = (mode == 1) && strstr(editquery, "dmap.itemid:") && ((!queuefilter) || strstr(queuefilter, "(null)"));
|
||||||
ret = make_queue_for_query(&items, editquery, queuefilter, sort, quirkyquery);
|
ret = make_queue_byquery(&items, editquery, queuefilter, sort, quirkyquery);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1745,7 +1745,7 @@ dacp_reply_playqueueedit_add(struct evhttp_request *req, struct evbuffer *evbuf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
snprintf(modifiedquery, sizeof(modifiedquery), "playlist:%d", plid);
|
snprintf(modifiedquery, sizeof(modifiedquery), "playlist:%d", plid);
|
||||||
ret = make_queue_for_query(&items, NULL, modifiedquery, sort, 0);
|
ret = make_queue_byquery(&items, NULL, modifiedquery, sort, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -1508,7 +1508,7 @@ mpd_command_stop(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct queue_item *
|
static struct queue_item *
|
||||||
make_queue_for_path(char *path, int recursive)
|
make_queue_bypath(char *path, int recursive)
|
||||||
{
|
{
|
||||||
struct query_params qp;
|
struct query_params qp;
|
||||||
struct queue_item *items;
|
struct queue_item *items;
|
||||||
@ -1557,7 +1557,7 @@ mpd_command_add(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
|||||||
return ACK_ERROR_ARG;
|
return ACK_ERROR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
items = make_queue_for_path(argv[1], 1);
|
items = make_queue_bypath(argv[1], 1);
|
||||||
|
|
||||||
if (!items)
|
if (!items)
|
||||||
{
|
{
|
||||||
@ -1604,7 +1604,7 @@ mpd_command_addid(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
|||||||
DPRINTF(E_LOG, L_MPD, "Adding at a specified position not supported for 'addid', adding songs at end of queue.\n");
|
DPRINTF(E_LOG, L_MPD, "Adding at a specified position not supported for 'addid', adding songs at end of queue.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
items = make_queue_for_path(argv[1], 0);
|
items = make_queue_bypath(argv[1], 0);
|
||||||
|
|
||||||
if (!items)
|
if (!items)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user