Fixed ReleaseView when displaying a release with no artist
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
${cover}
|
${cover}
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2>${name}</h2>
|
<h2>${name}</h2>
|
||||||
<h4>${artist-name}</h4>
|
${<if-has-artist>}<h4>${artist-name}</h4>${</if-has-artist>}
|
||||||
<h4>${<if-has-year>}${year}${</if-has-year>}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>}</h4>
|
<h4>${<if-has-year>}${year}${</if-has-year>}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>}</h4>
|
||||||
${clusters}
|
${clusters}
|
||||||
${play-btn}${add-btn}
|
${play-btn}${add-btn}
|
||||||
|
|||||||
@@ -97,10 +97,12 @@ Release::refresh()
|
|||||||
auto artists = release->getArtists();
|
auto artists = release->getArtists();
|
||||||
if (artists.size() > 1)
|
if (artists.size() > 1)
|
||||||
{
|
{
|
||||||
|
t->setCondition("if-has-artist", true);
|
||||||
t->bindString("artist-name", Wt::WString::tr("Lms.Explore.various-artists"));
|
t->bindString("artist-name", Wt::WString::tr("Lms.Explore.various-artists"));
|
||||||
}
|
}
|
||||||
else
|
else if (artists.size() == 1)
|
||||||
{
|
{
|
||||||
|
t->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