Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Genius): fix presence #8741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion websites/G/Genius/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"vi_VN": "Genius là bộ sưu tập lời bài hát và kiến thức âm nhạc lớn nhất thế giới."
},
"url": "genius.com",
"version": "2.0.24",
"version": "2.0.25",
"logo": "https://cdn.rcd.gg/PreMiD/websites/G/Genius/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/G/Genius/assets/thumbnail.png",
"color": "#FFFF64",
Expand Down
13 changes: 2 additions & 11 deletions websites/G/Genius/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,9 @@ presence.on("UpdateData", async () => {
document.querySelector("div[class*='SongPageGrid']") !== null ||
document.querySelector(".song_body-lyrics") !== null
) {
const artist = await presence.getPageVariable("_sf_async_config.authors");
presenceData.details = strings.lyrics;
presenceData.state = `${
document
.querySelector("a[class*='SongHeaderdesktop__Artist']")
?.textContent.trim() ||
document
.querySelector("a[class*='SongHeadermobile__Artist']")
?.textContent.trim() ||
document
.querySelector("a[class*='HeaderArtistAndTracklistdesktop__Artist']")
?.textContent.trim()
} - ${
presenceData.state = `${artist["_sf_async_config.authors"]} - ${
document
.querySelector('h1[class*="SongHeaderdesktop__Title"]')
?.textContent.trim() ||
Expand Down
Loading