fix missing thumbnails

+forced push fix woupsie
This commit is contained in:
Araxeus
2021-11-01 22:57:32 +02:00
parent c68daabeab
commit 0287b69424

View File

@ -52,6 +52,10 @@ function changeDisplay(showVideo) {
function videoStarted() {
if (videoExist()) {
const thumbnails = $('#movie_player').getPlayerResponse()?.videoDetails?.thumbnail?.thumbnails;
if (thumbnails && thumbnails.length > 0) {
$('#song-image img').src = thumbnails[thumbnails.length-1].url;
}
switchButtonDiv.style.display = "initial";
if (!options.hideVideo && $('#song-video.ytmusic-player').style.display === "none") {
changeDisplay(true);
@ -60,7 +64,6 @@ function videoStarted() {
changeDisplay(false);
switchButtonDiv.style.display = "none";
}
$('#song-image img').src = $('#movie_player').getPlayerResponse()?.videoDetails?.thumbnail?.thumbnails?.pop()?.url;
}
function videoExist() {