diff --git a/approot/playlist.xml b/approot/playlist.xml index 2543d616..266baa33 100644 --- a/approot/playlist.xml +++ b/approot/playlist.xml @@ -32,19 +32,7 @@ -
-
- ${cover class="media-object"} -
-
-

${name}

-
- - ${}${release-name}${} - ${}${artist-name}${} - - ${play-btn} ${del-btn} -
+ ${pos} ${name} ${}${release-name}${} ${}${artist-name}${} ${play-btn} ${del-btn}
diff --git a/src/ui/PlaylistView.cpp b/src/ui/PlaylistView.cpp index d3644bc2..a5fef657 100644 --- a/src/ui/PlaylistView.cpp +++ b/src/ui/PlaylistView.cpp @@ -117,6 +117,7 @@ Playlist::addSome() { Wt::WTemplate* entry = new Wt::WTemplate(Wt::WString::tr("template-playlist-entry"), _entriesContainer); + entry->bindString("pos", std::to_string(_entriesContainer->count())); entry->bindString("name", Wt::WString::fromUTF8(track->getName()), Wt::PlainText); auto artist = track->getArtist(); @@ -139,12 +140,6 @@ Playlist::addSome() entry->bindWidget("release-name", releaseAnchor); } - Wt::WImage *cover = new Wt::WImage(); - cover->setImageLink(SessionImageResource()->getTrackUrl(track.id(), 64)); - // Some images may not be square - cover->setWidth(64); - entry->bindWidget("cover", cover); - auto playBtn = new Wt::WText(Wt::WString::tr("btn-playlist-entry-play-btn"), Wt::XHTMLText); entry->bindWidget("play-btn", playBtn); // TODO