mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
fix missing thumbnails
+forced push fix woupsie
This commit is contained in:
@ -52,6 +52,10 @@ function changeDisplay(showVideo) {
|
|||||||
|
|
||||||
function videoStarted() {
|
function videoStarted() {
|
||||||
if (videoExist()) {
|
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";
|
switchButtonDiv.style.display = "initial";
|
||||||
if (!options.hideVideo && $('#song-video.ytmusic-player').style.display === "none") {
|
if (!options.hideVideo && $('#song-video.ytmusic-player').style.display === "none") {
|
||||||
changeDisplay(true);
|
changeDisplay(true);
|
||||||
@ -60,7 +64,6 @@ function videoStarted() {
|
|||||||
changeDisplay(false);
|
changeDisplay(false);
|
||||||
switchButtonDiv.style.display = "none";
|
switchButtonDiv.style.display = "none";
|
||||||
}
|
}
|
||||||
$('#song-image img').src = $('#movie_player').getPlayerResponse()?.videoDetails?.thumbnail?.thumbnails?.pop()?.url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function videoExist() {
|
function videoExist() {
|
||||||
|
|||||||
Reference in New Issue
Block a user