Fixed: SourceTitle if Album Title null in Discord ImportFailed event

Fixes #2134
This commit is contained in:
Qstick 2021-04-01 22:53:35 -04:00
parent d198c9987e
commit f0d1cde01a
2 changed files with 2 additions and 2 deletions

View File

@ -299,7 +299,7 @@ namespace NzbDrone.Core.Notifications.Discord
IconUrl = "https://raw.githubusercontent.com/lidarr/Lidarr/develop/Logo/256.png" IconUrl = "https://raw.githubusercontent.com/lidarr/Lidarr/develop/Logo/256.png"
}, },
Description = message.Message, Description = message.Message,
Title = message.Album.Title, Title = message.Album?.Title ?? message.Message,
Text = message.Message, Text = message.Message,
Color = (int)DiscordColors.Warning Color = (int)DiscordColors.Warning
} }

View File

@ -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 // TODO: Build out this message so that we can pass on what failed and what was successful
var downloadMessage = new AlbumDownloadMessage var downloadMessage = new AlbumDownloadMessage
{ {
Message = GetAlbumIncompleteImportMessage(message.TrackedDownload.DownloadItem.Title), Message = GetAlbumIncompleteImportMessage(message.TrackedDownload.DownloadItem.Title)
}; };
foreach (var notification in _notificationFactory.OnImportFailureEnabled()) foreach (var notification in _notificationFactory.OnImportFailureEnabled())