diff --git a/static/musik.js b/static/musik.js index 4b43191..8b9fcfb 100644 --- a/static/musik.js +++ b/static/musik.js @@ -41,9 +41,9 @@ function change_track(track) { player.play(); document.getElementById('nowPlaying').innerHTML = track; - let cd = document.getElementById('currentDirectory').innerText; + let arr = track.split('/'); let art = document.getElementById('albumCover'); - art.firstChild.src = '/musik/album_cover' + cd + 'folder.jpg'; + art.firstChild.src = '/musik/album_cover' + arr.slice(0, arr.length-1).join("/") + '/folder.jpg'; } function get_dir(item) {