As for tracks in albums, set multiple artists for each album, comma separated. Fixes #35

This commit is contained in:
emeric
2020-03-02 18:50:03 +01:00
parent 97754e5e97
commit d24ee46f8f
+7 -9
View File
@@ -470,22 +470,20 @@ releaseToResponseNode(const Release::pointer& release, Session& dbSession, const
} }
else if (!artists.empty()) else if (!artists.empty())
{ {
if (artists.size() > 1) albumNode.setAttribute("artist", getArtistNames(artists));
{
albumNode.setAttribute("artist", "Various Artists");
if (!id3) if (artists.size() == 1)
albumNode.setAttribute("parent", IdToString({Id::Type::Root}));
}
else
{ {
albumNode.setAttribute("artist", artists.front()->getName());
if (id3) if (id3)
albumNode.setAttribute("artistId", IdToString({Id::Type::Artist, artists.front().id()})); albumNode.setAttribute("artistId", IdToString({Id::Type::Artist, artists.front().id()}));
else else
albumNode.setAttribute("parent", IdToString({Id::Type::Artist, artists.front().id()})); albumNode.setAttribute("parent", IdToString({Id::Type::Artist, artists.front().id()}));
} }
else
{
if (!id3)
albumNode.setAttribute("parent", IdToString({Id::Type::Root}));
}
} }
if (id3) if (id3)