mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 21:42:46 +01:00
Fix Discord RPC album length < 2
This commit is contained in:
parent
65f3b251f4
commit
ffcb563b35
@ -60,8 +60,13 @@ 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) {
|
||||||
|
if (mediaInfo.album.length < 2) { // Fix for DiscordRPC 2 character minimum
|
||||||
|
presence.largeImageText = mediaInfo.album + " ";
|
||||||
|
}
|
||||||
|
else {
|
||||||
presence.largeImageText = mediaInfo.album;
|
presence.largeImageText = mediaInfo.album;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
presence.buttons = [{ label: buttonText, url: mediaInfo.url }];
|
presence.buttons = [{ label: buttonText, url: mediaInfo.url }];
|
||||||
} else {
|
} else {
|
||||||
presence.details = `Watching ${mediaInfo.title}`;
|
presence.details = `Watching ${mediaInfo.title}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user