fix: playlist cover auto-refresh after upload
Re-generate coverUrl (includes fresh auth params) + append _cb=timestamp to bypass browser cache. Update both detail view and edit modal preview. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d318d052c
commit
ce53c48835
2 files changed
+5
-3
No files matched your search
@@ -515,8 +515,10 @@ async function editPlCoverSelected(input){
|
|||||||
if(!res.ok)throw new Error(res.status);
|
if(!res.ok)throw new Error(res.status);
|
||||||
toast('Cover aktualisiert');
|
toast('Cover aktualisiert');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
const cv=document.getElementById('playlist-cover');
|
const bust=coverUrl(_currentPlaylist.coverArt,300)+'&_cb='+Date.now();
|
||||||
const img=cv?.querySelector('img');if(img)img.src=img.src.split('?')[0]+'?t='+Date.now();
|
const detailImg=document.getElementById('playlist-cover');
|
||||||
|
if(detailImg)detailImg.innerHTML=`<img src="${bust}" onerror="this.parentNode.innerHTML='<div class=\\'no-art\\'>🎶</div>'">`;
|
||||||
|
document.getElementById('edit-pl-cover').innerHTML=`<img src="${bust}" style="width:100%;height:100%;object-fit:cover">`;
|
||||||
},800);
|
},800);
|
||||||
}catch(e){
|
}catch(e){
|
||||||
_ndToken=null;
|
_ndToken=null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const CACHE = 'ns-v36';
|
const CACHE = 'ns-v37';
|
||||||
const PRECACHE = ['/', 'index.html', 'styles.css', 'app.js', 'manifest.json', 'icon.svg'];
|
const PRECACHE = ['/', 'index.html', 'styles.css', 'app.js', 'manifest.json', 'icon.svg'];
|
||||||
const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js'];
|
const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js'];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user