1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-09-30 15:10:39 +00:00

Regex fix for albumcover files

This commit is contained in:
jcorporation 2018-04-29 20:57:05 +01:00
parent 4200630849
commit 4f2562a740

View File

@ -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 {