Subsonic API: added getLyrics/getLyricsBySongId support, ref #379

This commit is contained in:
emeric
2024-10-26 19:04:11 +02:00
parent 72b1367ea6
commit 2d28ea61eb
13 changed files with 238 additions and 6 deletions
+5 -1
View File
@@ -196,7 +196,11 @@ namespace lms::api::subsonic
auto valueToPropertyTree = [](const Node::ValueType& value) {
boost::property_tree::ptree res;
std::visit([&](const auto& rawValue) {
res.put_value(rawValue);
using RawValueType = std::decay_t<decltype(rawValue)>;
if constexpr (std::is_same_v<RawValueType, Node::string>)
res.put_value(core::stringUtils::replaceInString(rawValue, "\n", "\\n"));
else
res.put_value(rawValue);
},
value);