Support songartistid (asri) in group requests and queuefilter=artist

- credit misenhower of wp8remote.com
This commit is contained in:
ejurgensen
2014-02-21 20:39:57 +01:00
parent 7997377deb
commit 190f91114e
5 changed files with 30 additions and 10 deletions

View File

@@ -724,6 +724,7 @@ player_queue_make_daap(struct player_source **head, const char *query, const cha
struct query_params qp;
struct player_source *ps;
int64_t albumid;
int64_t artistid;
int plid;
int id;
int idx;
@@ -769,6 +770,19 @@ player_queue_make_daap(struct player_source **head, const char *query, const cha
snprintf(buf, sizeof(buf), "f.songalbumid = %" PRIi64, albumid);
qp.filter = strdup(buf);
}
else if ((len > 7) && (strncmp(queuefilter, "artist:", 7) == 0))
{
qp.type = Q_ITEMS;
ret = safe_atoi64(strchr(queuefilter, ':') + 1, &artistid);
if (ret < 0)
{
DPRINTF(E_LOG, L_PLAYER, "Invalid artist id in queuefilter: %s\n", queuefilter);
return -1;
}
snprintf(buf, sizeof(buf), "f.songartistid = %" PRIi64, artistid);
qp.filter = strdup(buf);
}
else if ((len > 9) && (strncmp(queuefilter, "playlist:", 9) == 0))
{
qp.type = Q_PLITEMS;