Subsonic API: added sortName extra field for artists
This commit is contained in:
@@ -93,12 +93,12 @@ namespace API::Subsonic
|
||||
if (const Wt::WDateTime dateTime{ Service<Scrobbling::IScrobblingService>::get()->getStarredDateTime(user->getId(), release->getId()) }; dateTime.isValid())
|
||||
albumNode.setAttribute("starred", StringUtils::toISO8601String(dateTime)); // TODO report correct date/time
|
||||
|
||||
// OpenSubsonic specific field
|
||||
// OpenSubsonic specific fields (must always be set)
|
||||
{
|
||||
std::optional<UUID> mbid {release->getMBID()};
|
||||
albumNode.setAttribute("musicBrainzId", mbid ? mbid->getAsString() : "");
|
||||
}
|
||||
|
||||
|
||||
return albumNode;
|
||||
}
|
||||
}
|
||||
@@ -68,12 +68,13 @@ namespace API::Subsonic
|
||||
if (const Wt::WDateTime dateTime{ Service<Scrobbling::IScrobblingService>::get()->getStarredDateTime(user->getId(), artist->getId()) }; dateTime.isValid())
|
||||
artistNode.setAttribute("starred", StringUtils::toISO8601String(dateTime));
|
||||
|
||||
// OpenSubsonic specific field
|
||||
// OpenSubsonic specific fields (must always be set)
|
||||
{
|
||||
std::optional<UUID> mbid {artist->getMBID()};
|
||||
artistNode.setAttribute("musicBrainzId", mbid ? mbid->getAsString() : "");
|
||||
}
|
||||
|
||||
artistNode.setAttribute("sortName", artist->getSortName());
|
||||
|
||||
return artistNode;
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace API::Subsonic
|
||||
trackResponse.setAttribute("genre", clusters.front().front()->getName());
|
||||
}
|
||||
|
||||
// OpenSubsonic specific field
|
||||
// OpenSubsonic specific fields (must always be set)
|
||||
{
|
||||
std::optional<UUID> mbid {track->getTrackMBID()};
|
||||
trackResponse.setAttribute("musicBrainzId", mbid ? mbid->getAsString() : "");
|
||||
|
||||
Reference in New Issue
Block a user