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())
{
if (artists.size() > 1)
{
albumNode.setAttribute("artist", "Various Artists");
albumNode.setAttribute("artist", getArtistNames(artists));
if (!id3)
albumNode.setAttribute("parent", IdToString({Id::Type::Root}));
}
else
if (artists.size() == 1)
{
albumNode.setAttribute("artist", artists.front()->getName());
if (id3)
albumNode.setAttribute("artistId", IdToString({Id::Type::Artist, artists.front().id()}));
else
albumNode.setAttribute("parent", IdToString({Id::Type::Artist, artists.front().id()}));
}
else
{
if (!id3)
albumNode.setAttribute("parent", IdToString({Id::Type::Root}));
}
}
if (id3)