Skip to content

Commit

Permalink
Merge pull request #450 from HurleybirdJr/master
Browse files Browse the repository at this point in the history
Fix issue #449 Discord RPC stuck on "Browsing Tidal"
  • Loading branch information
Mastermindzh authored Aug 5, 2024
2 parents c3b7729 + ffcb563 commit 5b85e59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/scripts/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ const getActivity = (): Presence => {
presence.state = mediaInfo.artists ? mediaInfo.artists : "unknown artist(s)";
presence.largeImageKey = mediaInfo.image;
if (mediaInfo.album) {
presence.largeImageText = mediaInfo.album;
if (mediaInfo.album.length < 2) { // Fix for DiscordRPC 2 character minimum
presence.largeImageText = mediaInfo.album + " ";
}
else {
presence.largeImageText = mediaInfo.album;
}
}
presence.buttons = [{ label: buttonText, url: mediaInfo.url }];
} else {
Expand Down

0 comments on commit 5b85e59

Please sign in to comment.