Added support for explcit tags (rtng, ITUNESADVISORY)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "database/Image.hpp"
|
||||
#include "database/Release.hpp"
|
||||
#include "database/Track.hpp"
|
||||
#include "database/Types.hpp"
|
||||
#include "database/User.hpp"
|
||||
#include "services/feedback/IFeedbackService.hpp"
|
||||
#include "services/scrobbling/IScrobblingService.hpp"
|
||||
@@ -223,6 +224,18 @@ namespace lms::api::subsonic
|
||||
albumNode.addArrayChild("recordLabels", createRecordLabel(label));
|
||||
});
|
||||
|
||||
auto advisoryToExplicitStatus = [&](const core::EnumSet<db::Advisory> advisories) -> std::string_view {
|
||||
if (advisories.contains(db::Advisory::Explicit))
|
||||
return "explicit";
|
||||
|
||||
if (advisories.contains(db::Advisory::Clean))
|
||||
return "clean";
|
||||
|
||||
return "";
|
||||
};
|
||||
|
||||
albumNode.setAttribute("explicitStatus", advisoryToExplicitStatus(release->getAdvisories()));
|
||||
|
||||
return albumNode;
|
||||
}
|
||||
} // namespace lms::api::subsonic
|
||||
Reference in New Issue
Block a user