1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Handle Null in Discord Notification if no images

This commit is contained in:
Qstick 2020-11-05 21:56:26 -05:00
parent bab9b2c040
commit 4fa1955008

View File

@ -44,7 +44,7 @@ public override void OnGrab(GrabMessage message)
{
embed.Thumbnail = new DiscordImage
{
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster).Url
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster)?.Url
};
}
@ -52,7 +52,7 @@ public override void OnGrab(GrabMessage message)
{
embed.Image = new DiscordImage
{
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart).Url
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart)?.Url
};
}
@ -131,7 +131,7 @@ public override void OnDownload(DownloadMessage message)
{
embed.Thumbnail = new DiscordImage
{
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster).Url
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster)?.Url
};
}
@ -139,7 +139,7 @@ public override void OnDownload(DownloadMessage message)
{
embed.Image = new DiscordImage
{
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart).Url
Url = message.Movie.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart)?.Url
};
}