Skip to content

Commit

Permalink
fix(YouTube): not working outside playlist (#7512)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slowlife01 authored Jul 22, 2023
1 parent f8ca790 commit e147d3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion websites/Y/YouTube/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 14 additions & 11 deletions websites/Y/YouTube/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit e147d3d

Please sign in to comment.