Added track duration in various relevant place in the UI. #15

This commit is contained in:
emeric
2020-01-08 13:34:42 +01:00
parent 88c5475149
commit 5478406553
10 changed files with 151 additions and 14 deletions
+4 -1
View File
@@ -33,9 +33,10 @@
#include "resource/ImageResource.hpp"
#include "Filters.hpp"
#include "LmsApplication.hpp"
#include "LmsApplicationException.hpp"
#include "Filters.hpp"
#include "TrackStringUtils.hpp"
using namespace Database;
@@ -203,6 +204,8 @@ Release::refresh()
tracksAdd.emit({trackId});
}));
entry->bindString("duration", trackDurationToString(track->getDuration()), Wt::TextFormat::Plain);
LmsApp->getEvents().trackLoaded.connect(entry, [=] (Database::IdType loadedTrackId, bool /*play*/)
{
entry->toggleStyleClass("Lms-explore-release-entry-playing", loadedTrackId == trackId);