Added support for record labels, fixes #502

This commit is contained in:
emeric
2024-09-02 08:06:17 +02:00
parent 24e867ea8c
commit cb4014b0e5
17 changed files with 267 additions and 12 deletions
+7 -1
View File
@@ -36,6 +36,7 @@
#include "responses/DiscTitle.hpp"
#include "responses/ItemDate.hpp"
#include "responses/ItemGenre.hpp"
#include "responses/RecordLabel.hpp"
namespace lms::api::subsonic
{
@@ -186,7 +187,6 @@ namespace lms::api::subsonic
albumNode.setAttribute("isCompilation", isCompilation);
}
// disc titles
albumNode.createEmptyArrayChild("discTitles");
for (const DiscInfo& discInfo : release->getDiscs())
{
@@ -194,6 +194,12 @@ namespace lms::api::subsonic
albumNode.addArrayChild("discTitles", createDiscTitle(discInfo));
}
albumNode.createEmptyArrayChild("recordLabels");
release->visitLabels([&](const Label::pointer& label)
{
albumNode.addArrayChild("recordLabels", createRecordLabel(label));
});
return albumNode;
}
} // namespace lms::api::subsonic