Subsonic API: put artist display name instead of a comma separated list
This commit is contained in:
@@ -107,6 +107,9 @@ namespace API::Subsonic
|
|||||||
}
|
}
|
||||||
else if (!artists.empty())
|
else if (!artists.empty())
|
||||||
{
|
{
|
||||||
|
if (!release->getArtistDisplayName().empty())
|
||||||
|
albumNode.setAttribute("artist", release->getArtistDisplayName());
|
||||||
|
else
|
||||||
albumNode.setAttribute("artist", Utils::joinArtistNames(artists));
|
albumNode.setAttribute("artist", Utils::joinArtistNames(artists));
|
||||||
|
|
||||||
if (artists.size() == 1)
|
if (artists.size() == 1)
|
||||||
|
|||||||
@@ -127,6 +127,9 @@ namespace API::Subsonic
|
|||||||
const std::vector<Artist::pointer>& artists{ track->getArtists({TrackArtistLinkType::Artist}) };
|
const std::vector<Artist::pointer>& artists{ track->getArtists({TrackArtistLinkType::Artist}) };
|
||||||
if (!artists.empty())
|
if (!artists.empty())
|
||||||
{
|
{
|
||||||
|
if (!track->getArtistDisplayName().empty())
|
||||||
|
trackResponse.setAttribute("artist", track->getArtistDisplayName());
|
||||||
|
else
|
||||||
trackResponse.setAttribute("artist", Utils::joinArtistNames(artists));
|
trackResponse.setAttribute("artist", Utils::joinArtistNames(artists));
|
||||||
|
|
||||||
if (artists.size() == 1)
|
if (artists.size() == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user