Subsonic API : added getByYear in getAlbumList

This commit is contained in:
emeric
2019-07-31 13:20:57 +02:00
parent 775bb1dfe8
commit 71cc901932
3 changed files with 24 additions and 2 deletions
+7
View File
@@ -836,6 +836,13 @@ handleGetAlbumListRequestCommon(const RequestContext& context, bool id3)
{
releases = Release::getAll(context.dbSession, offset, size);
}
else if (type == "byYear")
{
int fromYear {getMandatoryParameterAs<int>(context.parameters, "fromYear")};
int toYear {getMandatoryParameterAs<int>(context.parameters, "toYear")};
releases = Release::getByYear(context.dbSession, fromYear, toYear, offset, size);
}
else if (type == "byGenre")
{
// Mandatory param