Added album play time. Fixes #186
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
<h3><div class="Lms-releasename text-primary">${name}</div></h3>
|
||||
${<if-has-release-artists>}${artists}${</if-has-release-artists>}
|
||||
${<if-has-various-release-artists>}<div class="Lms-artistname text-muted">${tr:Lms.Explore.various-artists}</div>${</if-has-various-release-artists>}
|
||||
<div class="text-muted"><small>${<if-has-year>}${year}${</if-has-year>}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>}</small></div>
|
||||
<div class="text-muted"><small>${<if-has-year>}${year}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>} · ${</if-has-year>}${duration}</small></div>
|
||||
${clusters}
|
||||
${play-btn class="Lms-explore-btn Lms-btn"}${more-btn class="Lms-explore-btn Lms-btn"}
|
||||
</div>
|
||||
|
||||
@@ -455,7 +455,7 @@ PlayQueue::addEntry(const Database::TrackListEntry::pointer& tracklistEntry)
|
||||
cover->setAttributeValue("onload", LmsApp->javaScriptClass() + ".onLoadCover(this)");
|
||||
}
|
||||
|
||||
entry->bindString("duration", trackDurationToString(track->getDuration()), Wt::TextFormat::Plain);
|
||||
entry->bindString("duration", durationToString(track->getDuration()), Wt::TextFormat::Plain);
|
||||
|
||||
Wt::WText* playBtn {entry->bindNew<Wt::WText>("play-btn", Wt::WString::tr("Lms.PlayQueue.template.play-btn"), Wt::TextFormat::XHTML)};
|
||||
playBtn->clicked().connect([=]
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <sstream>
|
||||
|
||||
std::string
|
||||
trackDurationToString(std::chrono::milliseconds msDuration)
|
||||
durationToString(std::chrono::milliseconds msDuration)
|
||||
{
|
||||
const std::chrono::seconds duration {std::chrono::duration_cast<std::chrono::seconds>(msDuration)};
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
#include <string>
|
||||
|
||||
std::string
|
||||
trackDurationToString(std::chrono::milliseconds msDuration);
|
||||
durationToString(std::chrono::milliseconds msDuration);
|
||||
|
||||
|
||||
@@ -129,6 +129,8 @@ Release::refreshView()
|
||||
}
|
||||
}
|
||||
|
||||
bindString("duration", durationToString(release->getDuration()), Wt::TextFormat::Plain);
|
||||
|
||||
refreshReleaseArtists(release);
|
||||
|
||||
{
|
||||
@@ -250,7 +252,7 @@ Release::refreshView()
|
||||
displayTrackPopupMenu(*moreBtn, trackId, tracksAction);
|
||||
});
|
||||
|
||||
entry->bindString("duration", trackDurationToString(track->getDuration()), Wt::TextFormat::Plain);
|
||||
entry->bindString("duration", durationToString(track->getDuration()), Wt::TextFormat::Plain);
|
||||
|
||||
LmsApp->getMediaPlayer().trackLoaded.connect(entry, [=] (TrackId loadedTrackId)
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace UserInterface::TrackListHelpers
|
||||
cover->setAttributeValue("onload", LmsApp->javaScriptClass() + ".onLoadCover(this)");
|
||||
}
|
||||
|
||||
entry->bindString("duration", trackDurationToString(track->getDuration()), Wt::TextFormat::Plain);
|
||||
entry->bindString("duration", durationToString(track->getDuration()), Wt::TextFormat::Plain);
|
||||
|
||||
Wt::WText* playBtn = entry->bindNew<Wt::WText>("play-btn", Wt::WString::tr("Lms.Explore.template.play-btn"), Wt::TextFormat::XHTML);
|
||||
playBtn->clicked().connect([trackId, &tracksAction]
|
||||
|
||||
Reference in New Issue
Block a user