diff --git a/src/main/plugins/discordrpc.ts b/src/main/plugins/discordrpc.ts index 54097861..740a79b6 100644 --- a/src/main/plugins/discordrpc.ts +++ b/src/main/plugins/discordrpc.ts @@ -137,11 +137,21 @@ export default class DiscordRPC { } }) - // Checks if the name is greater than 128 because some songs can be that long - if (activity.details && activity.details.length > 128) { + // Checks if the details is greater than 128 because some songs can be that long + if (activity.details && activity.details.length >= 128) { activity.details = activity.details.substring(0, 125) + '...' } + // Checks if the state is greater than 128 because some songs can be that long + if (activity.state && activity.state.length >= 128) { + activity.state = activity.state.substring(0, 125) + '...' + } + + // Checks if the state is greater than 128 because some songs can be that long + if (activity.largeImageText && activity.largeImageText.length >= 128) { + activity.largeImageText = activity.largeImageText.substring(0, 125) + '...' + } + // Check large image if (activity.largeImageKey == null || activity.largeImageKey === "" || activity.largeImageKey.length > 256) { activity.largeImageKey = "cider";