Skip to content

Commit

Permalink
fix(Genius): fix presence (#8741)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkvillager2 authored Sep 20, 2024
1 parent a5b38ab commit b23d117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
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

0 comments on commit b23d117

Please sign in to comment.