From 0a000a2cfbe6a51479e59a6caf1fed67ed056fb1 Mon Sep 17 00:00:00 2001 From: ltadeu6 Date: Sun, 7 Jun 2026 10:36:11 -0300 Subject: [PATCH] fix: load album art via fetch+createObjectURL to bypass mixed content block img src http:// from file:// page is blocked; fetch() to localhost works, so fetch the blob and use a blob: URL instead. Co-Authored-By: Claude Sonnet 4.6 --- plugin/contents/ui/dancer.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/contents/ui/dancer.html b/plugin/contents/ui/dancer.html index b230da5..d277031 100644 --- a/plugin/contents/ui/dancer.html +++ b/plugin/contents/ui/dancer.html @@ -1067,7 +1067,15 @@ function fetchTheme() { if (d.rgb) applyTheme(d.rgb); if (d.art_url && d.art_url !== lastArtUrl) { lastArtUrl = d.art_url; - document.getElementById('albumArtImg').src = 'http://127.0.0.1:8765/art?' + Date.now(); + 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(() => {}); } }) .catch(() => {});