1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-17 10:45:49 +02:00

Fixed: Discord notifications failing if episode overview is missing

This commit is contained in:
Mark McDowall 2020-10-25 11:46:45 -07:00
parent cfa0c6d0d7
commit c823654041

View File

@ -66,7 +66,7 @@ public override void OnGrab(GrabMessage message)
switch ((DiscordGrabFieldType)field)
{
case DiscordGrabFieldType.Overview:
var overview = episodes.First().Overview;
var overview = episodes.First().Overview ?? "";
discordField.Name = "Overview";
discordField.Value = overview.Length <= 300 ? overview : overview.Substring(0, 300) + "...";
break;
@ -157,7 +157,7 @@ public override void OnDownload(DownloadMessage message)
switch ((DiscordImportFieldType)field)
{
case DiscordImportFieldType.Overview:
var overview = episodes.First().Overview;
var overview = episodes.First().Overview ?? "";
discordField.Name = "Overview";
discordField.Value = overview.Length <= 300 ? overview : overview.Substring(0, 300) + "...";
break;