Subsonic API: made xml responses more compliant with legacy subsonic impl, fixes #559
This commit is contained in:
@@ -202,7 +202,10 @@ namespace lms::api::subsonic
|
|||||||
{
|
{
|
||||||
for (const auto& [key, childNode] : node._children)
|
for (const auto& [key, childNode] : node._children)
|
||||||
{
|
{
|
||||||
res.add_child(std::string{ key.str() }, nodeToPropertyTree(childNode));
|
boost::property_tree::ptree& tree{ res.add_child(std::string{ key.str() }, nodeToPropertyTree(childNode)) };
|
||||||
|
// Hardcoded attribute to simplify createOkResponse calls
|
||||||
|
if (key == "subsonic-response")
|
||||||
|
tree.put("<xmlattr>.xmlns", "http://subsonic.org/restapi");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& [key, childArrayNodes] : node._childrenArrays)
|
for (const auto& [key, childArrayNodes] : node._childrenArrays)
|
||||||
|
|||||||
Reference in New Issue
Block a user