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:
parent
0a000a2cfb
commit
458c90fb30
1 changed files with 2 additions and 9 deletions
|
|
@ -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(() => {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue