Subsonic API: handle new field mediaType
This commit is contained in:
@@ -132,6 +132,9 @@ namespace API::Subsonic
|
||||
albumNode.setAttribute("starred", StringUtils::toISO8601String(dateTime)); // TODO report correct date/time
|
||||
|
||||
// OpenSubsonic specific fields (must always be set)
|
||||
if (!id3)
|
||||
albumNode.setAttribute("mediaType", "album");
|
||||
|
||||
{
|
||||
std::optional<UUID> mbid{ release->getMBID() };
|
||||
albumNode.setAttribute("musicBrainzId", mbid ? mbid->getAsString() : "");
|
||||
|
||||
@@ -90,6 +90,9 @@ namespace API::Subsonic
|
||||
artistNode.setAttribute("starred", StringUtils::toISO8601String(dateTime));
|
||||
|
||||
// OpenSubsonic specific fields (must always be set)
|
||||
if (!id3)
|
||||
artistNode.setAttribute("mediaType", "artist");
|
||||
|
||||
{
|
||||
std::optional<UUID> mbid{ artist->getMBID() };
|
||||
artistNode.setAttribute("musicBrainzId", mbid ? mbid->getAsString() : "");
|
||||
|
||||
@@ -157,6 +157,8 @@ namespace API::Subsonic
|
||||
}
|
||||
|
||||
// OpenSubsonic specific fields (must always be set)
|
||||
trackResponse.setAttribute("mediaType", "song");
|
||||
|
||||
{
|
||||
std::optional<UUID> mbid{ track->getRecordingMBID() };
|
||||
trackResponse.setAttribute("musicBrainzId", mbid ? mbid->getAsString() : "");
|
||||
|
||||
Reference in New Issue
Block a user