Merge pull request #450 from HurleybirdJr/master

Fix issue #449 Discord RPC stuck on "Browsing Tidal"
This commit is contained in:
Rick van Lieshout 2024-08-05 18:28:44 +02:00 committed by GitHub
commit 5b85e59fc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,7 +60,12 @@ const getActivity = (): Presence => {
presence.state = mediaInfo.artists ? mediaInfo.artists : "unknown artist(s)"; presence.state = mediaInfo.artists ? mediaInfo.artists : "unknown artist(s)";
presence.largeImageKey = mediaInfo.image; presence.largeImageKey = mediaInfo.image;
if (mediaInfo.album) { 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 }]; presence.buttons = [{ label: buttonText, url: mediaInfo.url }];
} else { } else {