From f0d1cde01afcf9ddca647f7883f911ecceccacd5 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 1 Apr 2021 22:53:35 -0400 Subject: [PATCH] Fixed: SourceTitle if Album Title null in Discord ImportFailed event Fixes #2134 --- 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 b5a63890c..112bbe55c 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -299,7 +299,7 @@ namespace NzbDrone.Core.Notifications.Discord IconUrl = "https://raw.githubusercontent.com/lidarr/Lidarr/develop/Logo/256.png" }, Description = message.Message, - Title = message.Album.Title, + Title = message.Album?.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 ac82a0e6e..c71a8376b 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -241,7 +241,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 AlbumDownloadMessage { - Message = GetAlbumIncompleteImportMessage(message.TrackedDownload.DownloadItem.Title), + Message = GetAlbumIncompleteImportMessage(message.TrackedDownload.DownloadItem.Title) }; foreach (var notification in _notificationFactory.OnImportFailureEnabled())