Fixed biography response for xml format, fixes #656
This commit is contained in:
@@ -548,7 +548,17 @@ namespace lms::api::subsonic
|
|||||||
|
|
||||||
ArtistInfo::find(context.dbSession, id, Range{ .offset = 0, .size = 1 }, [&](const ArtistInfo::pointer& artistInfo) {
|
ArtistInfo::find(context.dbSession, id, Range{ .offset = 0, .size = 1 }, [&](const ArtistInfo::pointer& artistInfo) {
|
||||||
if (!artistInfo->getBiography().empty())
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user