Fixed ReleasesView when displaying a release with no artist
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h4 class="media-heading">${release-name}</h4>
|
<h4 class="media-heading">${release-name}</h4>
|
||||||
${artist-name}
|
${<if-has-artist>}${artist-name}${</if-has-artist>}
|
||||||
</div>
|
</div>
|
||||||
${play-btn}${add-btn}
|
${play-btn}${add-btn}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -107,14 +107,15 @@ Releases::addSome()
|
|||||||
entry->bindWidget("release-name", releaseAnchor);
|
entry->bindWidget("release-name", releaseAnchor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
auto artists = release->getArtists();
|
auto artists = release->getArtists();
|
||||||
if (artists.size() > 1)
|
if (artists.size() > 1)
|
||||||
{
|
{
|
||||||
|
entry->setCondition("if-has-artist", true);
|
||||||
entry->bindString("artist-name", Wt::WString::tr("Lms.Explore.various-artists"));
|
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::WAnchor* artistAnchor = LmsApplication::createArtistAnchor(artists.front().id());
|
||||||
Wt::WText* artist = new Wt::WText(artistAnchor);
|
Wt::WText* artist = new Wt::WText(artistAnchor);
|
||||||
artist->setText(Wt::WString::fromUTF8(artists.front()->getName(), Wt::PlainText));
|
artist->setText(Wt::WString::fromUTF8(artists.front()->getName(), Wt::PlainText));
|
||||||
|
|||||||
Reference in New Issue
Block a user