Show album art in browser

This commit is contained in:
Sijmen 2023-04-27 15:36:35 +02:00
parent fc1f9c67bd
commit 4513233ec1
Signed by: vijfhoek
GPG Key ID: DAF7821E067D9C48
2 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,9 @@
{% when mpd::Entry::Song with { name, path, artist } %}
<li hx-post="/queue?path={{path}}" hx-swap="none" role="button">
<span class="material-symbols-outlined">music_note</span>
<!-- img src="/art?path={{path}}" -->
<div class="albumart">
<img src="/art?path={{path}}" onerror="this.style.visibility = 'hidden'">
</div>
<div class="song">
<div class="song__name">{{ name }}</div>
<div class="song__artist">{{ artist }}</div>

View File

@ -4,7 +4,7 @@
{% for item in queue %}
<li {% if item.playing %}class="playing"{% endif %}>
<div class="albumart">
<img src="/art?path={{ item.file }}">
<img src="/art?path={{ item.file }}" onerror="this.style.opacity = 0">
</div>
<div class="metadata">
<div class="song__name">{{ item.title }}</div>