|
|
@ -33,10 +33,12 @@ function show() |
|
|
|
getArtistURL(MPDartist); |
|
|
|
getArtistURL(MPDartist); |
|
|
|
$("#trackname span").text(MPDartist+" - "+MPDsong); |
|
|
|
$("#trackname span").text(MPDartist+" - "+MPDsong); |
|
|
|
getYouTubeRequest(MPDfile); |
|
|
|
getYouTubeRequest(MPDfile); |
|
|
|
|
|
|
|
addText(MPDfile); |
|
|
|
} else if (MPDCurr != MPDfile) { |
|
|
|
} else if (MPDCurr != MPDfile) { |
|
|
|
getArtistURL(MPDartist); |
|
|
|
getArtistURL(MPDartist); |
|
|
|
$("#trackname span").text(MPDartist+" - "+MPDsong); |
|
|
|
$("#trackname span").text(MPDartist+" - "+MPDsong); |
|
|
|
getYouTubeRequest(MPDfile); |
|
|
|
getYouTubeRequest(MPDfile); |
|
|
|
|
|
|
|
addText(MPDfile); |
|
|
|
} |
|
|
|
} |
|
|
|
MPDCurr = MPDfile; |
|
|
|
MPDCurr = MPDfile; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -88,3 +90,10 @@ function showResults(results) { |
|
|
|
document.querySelector('a[name="YouTubeURL"]').setAttribute('href', "https://www.youtube.com/watch?v="+YouURL); |
|
|
|
document.querySelector('a[name="YouTubeURL"]').setAttribute('href', "https://www.youtube.com/watch?v="+YouURL); |
|
|
|
console.log("https://www.youtube.com/watch?v="+YouURL); |
|
|
|
console.log("https://www.youtube.com/watch?v="+YouURL); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function addText(MPDfile) { |
|
|
|
|
|
|
|
let last_track = document.createElement('div'); |
|
|
|
|
|
|
|
last_track.className = "list_el"; |
|
|
|
|
|
|
|
last_track.innerHTML = MPDfile; |
|
|
|
|
|
|
|
track_list.prepend(last_track); |
|
|
|
|
|
|
|
} |
|
|
|