mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-18 19:34:48 +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) {
|
function changeCover(obj) {
|
||||||
if (obj.data.artist && obj.data.album) {
|
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+'")';
|
document.getElementById('album-cover').style.backgroundImage='url("/covers/'+coverImg+'")';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user