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:
parent
4200630849
commit
4f2562a740
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user