API Subsonic: added authentication support

This commit is contained in:
emeric
2019-04-05 10:54:36 +02:00
parent 3ee937a409
commit 35b3d631ef
9 changed files with 107 additions and 14 deletions
+5
View File
@@ -28,6 +28,9 @@ namespace API::Subsonic
boost::optional<Id>
IdFromString(const std::string& id)
{
if (id == "root")
return Id{Id::Type::Root};
std::vector<std::string> values {splitString(id, "-")};
if (values.size() != 2)
{
@@ -69,6 +72,8 @@ IdToString(const Id& id)
switch (id.type)
{
case Id::Type::Root:
return "root";
case Id::Type::Artist:
res = "artist-";
break;