Skip to content

Discord RPC artist name fixed#4311

Open
TwixierDev wants to merge 1 commit intopear-devs:masterfrom
TwixierDev:master
Open

Discord RPC artist name fixed#4311
TwixierDev wants to merge 1 commit intopear-devs:masterfrom
TwixierDev:master

Conversation

@TwixierDev
Copy link

The code songInfo.tags?.at(0) in discord-service.ts 122:9 was retrieving the first tag of the video instead of finding the artist name, and if it couldn't find it, it was returning the songInfo.artist code.

When I rearranged the code in the opposite way, it now does the same thing for the songInfo.artist code. I've shown the before and after below.

Untitled-3

Comment on lines 121 to 123
state: sanitizeActivityText(
songInfo.tags?.at(0) ?? songInfo.artist
songInfo.artist ?? songInfo.tags?.at(0)
), // Artist name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ⏎········songInfo.artist·??·songInfo.tags?.at(0)·⏎······ with songInfo.artist·??·songInfo.tags?.at(0)

Suggested change
state: sanitizeActivityText(
songInfo.tags?.at(0) ?? songInfo.artist
songInfo.artist ?? songInfo.tags?.at(0)
), // Artist name
state: sanitizeActivityText(songInfo.artist ?? songInfo.tags?.at(0)), // Artist name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments