[Cover] Adding external cover file support (lookup in the same directory)

This commit is contained in:
emeric
2015-06-28 19:49:58 +02:00
parent 794de2fda8
commit 75c700df2a
22 changed files with 470 additions and 96 deletions
+3 -2
View File
@@ -382,10 +382,11 @@ PlayQueue::addTracks(const std::vector<Database::Track::id_type>& trackIds)
_model->setData(dataRow, COLUMN_ID_TRACK_ID, track.id(), Wt::UserRole);
std::string coverUrl;
if (track->hasCover())
if (track->getCoverType() != Database::Track::CoverType::None)
coverUrl = LmsApplication::instance()->getCoverResource()->getTrackUrl(track.id(), 64);
else
coverUrl = LmsApplication::instance()->getCoverResource()->getUnkownTrackUrl(64);
coverUrl = LmsApplication::instance()->getCoverResource()->getUnknownTrackUrl(64);
_model->setData(dataRow, COLUMN_ID_COVER, coverUrl, Wt::DecorationRole);
_model->setData(dataRow, COLUMN_ID_COVER, "playqueue-cover", Wt::StyleClassRole);