fix: load album art from file:///tmp/skeledance_art.jpg

Avoids WebEngine mixed-content block on http:// img src from file://.
music-light now saves the PIL image to disk on each track change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ltadeu6 2026-06-07 10:37:59 -03:00
parent 0a000a2cfb
commit 458c90fb30
No known key found for this signature in database
GPG key ID: FB9FDAB6B6F3418D

View file

@ -1067,15 +1067,8 @@ function fetchTheme() {
if (d.rgb) applyTheme(d.rgb);
if (d.art_url && d.art_url !== lastArtUrl) {
lastArtUrl = d.art_url;
fetch('http://127.0.0.1:8765/art?' + Date.now())
.then(r => r.blob())
.then(blob => {
const img = document.getElementById('albumArtImg');
if (img._blobUrl) URL.revokeObjectURL(img._blobUrl);
img._blobUrl = URL.createObjectURL(blob);
img.src = img._blobUrl;
})
.catch(() => {});
document.getElementById('albumArtImg').src =
'file:///tmp/skeledance_art.jpg?' + Date.now();
}
})
.catch(() => {});