Fixed biography response for xml format, fixes #656

This commit is contained in:
emeric
2025-04-06 11:22:39 +02:00
parent 9edc38b062
commit aa281bbd22
+11 -1
View File
@@ -548,7 +548,17 @@ namespace lms::api::subsonic
ArtistInfo::find(context.dbSession, id, Range{ .offset = 0, .size = 1 }, [&](const ArtistInfo::pointer& artistInfo) {
if (!artistInfo->getBiography().empty())
artistInfoNode.setAttribute("biography", artistInfo->getBiography());
{
switch (context.responseFormat)
{
case ResponseFormat::json:
artistInfoNode.setAttribute("biography", artistInfo->getBiography());
break;
case ResponseFormat::xml:
artistInfoNode.createChild("biography").setValue(artistInfo->getBiography());
break;
}
}
});
}