Fixed: Limit Discord embed title length to 256 characters

Co-authored-by: HeyBanditoz <7574664+HeyBanditoz@users.noreply.github.com>
(cherry picked from commit a6a61a016be777972f60f76a63d8e828f96a27cd)

Closes #3796
pull/3802/head
Hayden 1 year ago committed by Bogdan
parent 9bc318e6b0
commit 048cbe9fd1

@ -485,7 +485,9 @@ namespace NzbDrone.Core.Notifications.Discord
{
var albumTitles = string.Join(" + ", albums.Select(e => e.Title));
return $"{artist.Name} - {albumTitles}";
var title = $"{artist.Name} - {albumTitles}";
return title.Length > 256 ? $"{title.AsSpan(0, 253)}..." : title;
}
}
}

Loading…
Cancel
Save