Fixed: SourceTitle if Album Title null in Discord ImportFailed event

Fixes #2134
pull/2154/head
Qstick 4 years ago
parent d198c9987e
commit f0d1cde01a

@ -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
} }

@ -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())

Loading…
Cancel
Save