diff --git a/websites/Y/YouTube/metadata.json b/websites/Y/YouTube/metadata.json index f64a0a2fe8b2..450726e76ef8 100644 --- a/websites/Y/YouTube/metadata.json +++ b/websites/Y/YouTube/metadata.json @@ -72,7 +72,7 @@ "www.youtube.com", "studio.youtube.com" ], - "version": "5.13.3", + "version": "5.13.4", "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 0bf3c1d497f5..733a4420117b 100644 --- a/websites/Y/YouTube/presence.ts +++ b/websites/Y/YouTube/presence.ts @@ -328,10 +328,10 @@ presence.on("UpdateData", async () => { ).textContent; // Get channel name when viewing a channel } else if ( - !document.querySelector("#text.ytd-channel-name")?.textContent && documentTitle.includes( document.querySelector("#text.ytd-channel-name")?.textContent - ) + ) && + document.querySelector("#text.ytd-channel-name")?.textContent ) user = document.querySelector("#text.ytd-channel-name").textContent; // Get channel name from website's title @@ -399,7 +399,11 @@ presence.on("UpdateData", async () => { // When viewing a community post document.querySelector( "#author-thumbnail > a > yt-img-shadow > img" - ) + ) ?? + // When viewing a channel on the normal channel page + document + .querySelector(".yt-spec-avatar-shape") + ?.querySelector("img") )?.src.replace(/=s[0-9]+/, "=s512") ?? YouTubeAssets.Logo; if (channelImg) presenceData.largeImageKey = channelImg; }