From 4f2562a7404bdd62c637a36cc2dd76ded940dc99 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Sun, 29 Apr 2018 20:57:05 +0100 Subject: [PATCH] Regex fix for albumcover files --- htdocs/js/custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/js/custom.js b/htdocs/js/custom.js index f32d0d6..3756429 100644 --- a/htdocs/js/custom.js +++ b/htdocs/js/custom.js @@ -10,7 +10,7 @@ document.getElementById('player').parentNode.style.display='none'; function changeCover(obj) { if (obj.data.artist && obj.data.album) { - var coverImg=obj.data.album_artist.replace(/ /g,'_')+'-'+obj.data.album.replace(/ /g,'_')+'.jpg'; + var coverImg=obj.data.album_artist.replace(/\s+/g,'_')+'-'+obj.data.album.replace(/\s+/g,'_')+'.jpg'; document.getElementById('album-cover').style.backgroundImage='url("/covers/'+coverImg+'")'; } else {