Add when it was played for spotify in recent mode (#104)

This commit is contained in:
Milo
2021-02-05 20:23:08 +00:00
committed by GitHub
parent 5eaf603357
commit a7f9f71566
7 changed files with 28 additions and 11 deletions

View File

@@ -20,12 +20,15 @@
<% } else { %>
<% if (plugins.music.tracks.length) { %>
<div class="tracklist">
<% for (const {name = "", artist = "", artwork = ""} of plugins.music.tracks) { %>
<% for (const {name = "", artist = "", artwork = "", played_at = ""} of plugins.music.tracks) { %>
<div class="track">
<img src="data:image/png;base64,<%= artwork %>" width="32" height="32" alt=""/>
<img src="data:image/png;base64,<%= artwork %>" width="<%= !!played_at.length ? 48 : 32 %>" height="<%= !!played_at.length ? 48 : 32 %>" alt=""/>
<div class="infos">
<div class="name"><%= name %></div>
<div class="name"><b><%= name %><b></div>
<div class="artist"><%= artist %></div>
<% if (played_at.length) { %>
<div class="played_at"><%= played_at %></div>
<% } %>
</div>
</div>
<% } %>
@@ -40,4 +43,4 @@
</section>
</div>
</section>
<% } %>
<% } %>