diff --git a/plugins/video-toggle/front.js b/plugins/video-toggle/front.js index 5adb7ab0..d550a375 100644 --- a/plugins/video-toggle/front.js +++ b/plugins/video-toggle/front.js @@ -98,6 +98,6 @@ function observeThumbnail() { function forceThumbnail(img) { const thumbnails = $('#movie_player').getPlayerResponse()?.videoDetails?.thumbnail?.thumbnails; if (thumbnails && thumbnails.length > 0) { - img.src = thumbnails[thumbnails.length - 1].url; + img.src = thumbnails[thumbnails.length - 1].url.split("?")[0]; } } diff --git a/providers/song-info-front.js b/providers/song-info-front.js index 072d7a53..03a8c6b1 100644 --- a/providers/song-info-front.js +++ b/providers/song-info-front.js @@ -18,8 +18,8 @@ module.exports = () => { // name = "dataloaded" and abit later "dataupdated" apiEvent.detail.addEventListener('videodatachange', (name, dataEvent) => { if (name !== 'dataloaded') return; - ipcRenderer.send("song-info-request", JSON.stringify(dataEvent.playerResponse)); video.dispatchEvent(srcChangedEvent); + ipcRenderer.send("song-info-request", JSON.stringify(dataEvent.playerResponse)); }) }, { once: true, passive: true }); diff --git a/providers/song-info.js b/providers/song-info.js index 37cd55fa..1c2c96c7 100644 --- a/providers/song-info.js +++ b/providers/song-info.js @@ -52,7 +52,7 @@ const handleData = async (responseText, win) => { songInfo.title = cleanupName(data?.videoDetails?.title); songInfo.artist =cleanupName(data?.videoDetails?.author); songInfo.views = data?.videoDetails?.viewCount; - songInfo.imageSrc = data?.videoDetails?.thumbnail?.thumbnails?.pop()?.url; + songInfo.imageSrc = data?.videoDetails?.thumbnail?.thumbnails?.pop()?.url.split("?")[0]; songInfo.songDuration = data?.videoDetails?.lengthSeconds; songInfo.image = await getImage(songInfo.imageSrc); songInfo.uploadDate = data?.microformat?.microformatDataRenderer?.uploadDate;