Fixed ReleasesView when displaying a release with no artist

This commit is contained in:
emeric
2018-03-25 22:47:53 +02:00
parent 145244102b
commit b03622f677
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -107,14 +107,15 @@ Releases::addSome()
entry->bindWidget("release-name", releaseAnchor);
}
auto artists = release->getArtists();
if (artists.size() > 1)
{
entry->setCondition("if-has-artist", true);
entry->bindString("artist-name", Wt::WString::tr("Lms.Explore.various-artists"));
}
else
else if (artists.size() == 1)
{
entry->setCondition("if-has-artist", true);
Wt::WAnchor* artistAnchor = LmsApplication::createArtistAnchor(artists.front().id());
Wt::WText* artist = new Wt::WText(artistAnchor);
artist->setText(Wt::WString::fromUTF8(artists.front()->getName(), Wt::PlainText));