1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Fixed: Grab/Import fields for Discord notifications being duplicated

This commit is contained in:
Mark McDowall 2020-10-18 19:24:21 -07:00
parent f701adaef5
commit e90e144ebc
2 changed files with 4 additions and 4 deletions

View File

@ -138,7 +138,7 @@ public override void OnDownload(DownloadMessage message)
{
embed.Thumbnail = new DiscordImage
{
Url = series.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster).Url
Url = series.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster)?.Url
};
}
@ -146,7 +146,7 @@ public override void OnDownload(DownloadMessage message)
{
embed.Image = new DiscordImage
{
Url = series.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart).Url
Url = series.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart)?.Url
};
}

View File

@ -19,8 +19,8 @@ public class DiscordSettings : IProviderConfig
public DiscordSettings()
{
//Set Default Fields
GrabFields = new List<int> { 0, 1, 2, 3, 5, 6, 7, 8, 9 };
ImportFields = new List<int> { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12 };
GrabFields = new [] { 0, 1, 2, 3, 5, 6, 7, 8, 9 };
ImportFields = new [] { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12 };
}
private static readonly DiscordSettingsValidator Validator = new DiscordSettingsValidator();