Subsonic API: added replayGain field in Song

This commit is contained in:
emeric
2023-10-06 16:46:15 +02:00
parent 85e2ede2f2
commit de10da87d7
6 changed files with 85 additions and 2 deletions
@@ -195,6 +195,8 @@ namespace API::Subsonic
res.put("<xmlattr>." + itAttribute.first, std::get<std::string>(itAttribute.second));
else if (std::holds_alternative<bool>(itAttribute.second))
res.put("<xmlattr>." + itAttribute.first, std::get<bool>(itAttribute.second));
else if (std::holds_alternative<float>(itAttribute.second))
res.put("<xmlattr>." + itAttribute.first, std::get<float>(itAttribute.second));
else if (std::holds_alternative<long long>(itAttribute.second))
res.put("<xmlattr>." + itAttribute.first, std::get<long long>(itAttribute.second));
}
@@ -248,6 +250,8 @@ namespace API::Subsonic
return Json::Value {std::get<std::string>(value)};
else if (std::holds_alternative<bool>(value))
return Json::Value {std::get<bool>(value)};
else if (std::holds_alternative<float>(value))
return Json::Value{ std::get<float>(value) };
else if (std::holds_alternative<long long>(value))
return Json::Value {std::get<long long>(value)};