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 } %} {% when mpd::Entry::Song with { name, path, artist } %}
<li hx-post="/queue?path={{path}}" hx-swap="none" role="button"> <li hx-post="/queue?path={{path}}" hx-swap="none" role="button">
<span class="material-symbols-outlined">music_note</span> <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">
<div class="song__name">{{ name }}</div> <div class="song__name">{{ name }}</div>
<div class="song__artist">{{ artist }}</div> <div class="song__artist">{{ artist }}</div>

View File

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