mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-29 00:23:23 -05:00
Rename make_queue function and set as static
This commit is contained in:
parent
1812848ee1
commit
8e1834cdea
@ -820,9 +820,8 @@ find_first_song_id(const char *query)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Thread: httpd (DACP) */
|
static int
|
||||||
int
|
make_queue_for_query(struct player_source **head, const char *query, const char *queuefilter, const char *sort, int quirk)
|
||||||
player_queue_make_daap(struct player_source **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;
|
||||||
@ -998,7 +997,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 = player_queue_make_daap(&ps, cuequery, NULL, sort, 0);
|
ret = make_queue_for_query(&ps, 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");
|
||||||
@ -1731,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 = player_queue_make_daap(&ps, editquery, queuefilter, sort, quirkyquery);
|
ret = make_queue_for_query(&ps, editquery, queuefilter, sort, quirkyquery);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1746,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 = player_queue_make_daap(&ps, NULL, modifiedquery, sort, 0);
|
ret = make_queue_for_query(&ps, NULL, modifiedquery, sort, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -1506,8 +1506,8 @@ mpd_command_stop(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct player_source *
|
static struct player_source *
|
||||||
player_queue_make_mpd(char *path, int recursive)
|
make_queue_for_path(char *path, int recursive)
|
||||||
{
|
{
|
||||||
struct query_params qp;
|
struct query_params qp;
|
||||||
struct player_source *ps;
|
struct player_source *ps;
|
||||||
@ -1556,7 +1556,7 @@ mpd_command_add(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
|||||||
return ACK_ERROR_ARG;
|
return ACK_ERROR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
ps = player_queue_make_mpd(argv[1], 1);
|
ps = make_queue_for_path(argv[1], 1);
|
||||||
|
|
||||||
if (!ps)
|
if (!ps)
|
||||||
{
|
{
|
||||||
@ -1603,7 +1603,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");
|
||||||
}
|
}
|
||||||
|
|
||||||
ps = player_queue_make_mpd(argv[1], 0);
|
ps = make_queue_for_path(argv[1], 0);
|
||||||
|
|
||||||
if (!ps)
|
if (!ps)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user