From 1dd61e826bfee74a3007f3f8832cbe79caff8177 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 20 Jan 2022 22:08:00 +0000 Subject: [PATCH] Fixed: SourceTitle if Book Title null in Discord ImportFailed event Fixes READARR-FG --- src/NzbDrone.Core/Notifications/Discord/Discord.cs | 2 +- src/NzbDrone.Core/Notifications/NotificationService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Discord/Discord.cs b/src/NzbDrone.Core/Notifications/Discord/Discord.cs index 1fa1e7383..89429f7c7 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -174,7 +174,7 @@ namespace NzbDrone.Core.Notifications.Discord new Embed { Description = message.Message, - Title = message.Book.Title, + Title = message.Book?.Title ?? message.Message, Text = message.Message, Color = (int)DiscordColors.Warning } diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index b8f7e4cea..ce98decbe 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -313,7 +313,7 @@ namespace NzbDrone.Core.Notifications // TODO: Build out this message so that we can pass on what failed and what was successful var downloadMessage = new BookDownloadMessage { - Message = GetBookIncompleteImportMessage(message.TrackedDownload.DownloadItem.Title), + Message = GetBookIncompleteImportMessage(message.TrackedDownload.DownloadItem.Title) }; foreach (var notification in _notificationFactory.OnImportFailureEnabled())