mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-25 15:22:42 +00:00
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
This commit is contained in:
parent
9bc318e6b0
commit
048cbe9fd1
1 changed files with 3 additions and 1 deletions
|
@ -485,7 +485,9 @@ private string GetTitle(Artist artist, List<Album> albums)
|
|||
{
|
||||
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…
Reference in a new issue