diff --git a/websites/Y/YouTube/metadata.json b/websites/Y/YouTube/metadata.json index 42222692727f..38e76bd11609 100644 --- a/websites/Y/YouTube/metadata.json +++ b/websites/Y/YouTube/metadata.json @@ -67,7 +67,7 @@ "www.youtube.com", "studio.youtube.com" ], - "version": "5.4.7", + "version": "5.4.8", "logo": "https://cdn.rcd.gg/PreMiD/websites/Y/YouTube/assets/logo.png", "thumbnail": "https://cdn.rcd.gg/PreMiD/websites/Y/YouTube/assets/thumbnail.jpg", "color": "#E40813", diff --git a/websites/Y/YouTube/presence.ts b/websites/Y/YouTube/presence.ts index b25a918bcad7..313b994d633e 100644 --- a/websites/Y/YouTube/presence.ts +++ b/websites/Y/YouTube/presence.ts @@ -290,18 +290,21 @@ presence.on("UpdateData", async () => { !title || title.textContent.replace(/\s+/g, "") === "" ? document.querySelector("div.ytp-title-text > a").textContent : title.textContent; - const finalPlaylistTitle = document.querySelector( - "#header-description > h3:nth-child(1) > yt-formatted-string > a" - ).textContent, - finalPlaylistQueue = `${ + const finalPlaylistTitle = document.querySelector( - "#publisher-container > div > yt-formatted-string > span:nth-child(1)" - ).textContent - } / ${ - document.querySelector( - "#publisher-container > div > yt-formatted-string > span:nth-child(3)" - ).textContent - }`; + "#content #header-description > h3:nth-child(1) > yt-formatted-string > a" + )?.textContent ?? "", + finalPlaylistQueue = finalPlaylistTitle + ? `${ + document.querySelector( + "#content #publisher-container > div > yt-formatted-string > span:nth-child(1)" + ).textContent + } / ${ + document.querySelector( + "#content #publisher-container > div > yt-formatted-string > span:nth-child(3)" + ).textContent + }` + : ""; //* YouTube Movies if (