From e16ace54a8120cd98007a09fe1e6136be3e699fc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 16 Aug 2024 22:17:06 -0700 Subject: [PATCH] New: Optionally include Custom Format Score for Discord On File Import notifications --- src/NzbDrone.Core/Notifications/Discord/Discord.cs | 8 ++++++++ .../Notifications/Discord/DiscordFieldType.cs | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Notifications/Discord/Discord.cs b/src/NzbDrone.Core/Notifications/Discord/Discord.cs index 266329c67..11ae1127f 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -224,6 +224,14 @@ namespace NzbDrone.Core.Notifications.Discord discordField.Name = "Links"; discordField.Value = GetLinksString(series); break; + case DiscordImportFieldType.CustomFormats: + discordField.Name = "Custom Formats"; + discordField.Value = string.Join("|", message.EpisodeInfo.CustomFormats); + break; + case DiscordImportFieldType.CustomFormatScore: + discordField.Name = "Custom Format Score"; + discordField.Value = message.EpisodeInfo.CustomFormatScore.ToString(); + break; } if (discordField.Name.IsNotNullOrWhiteSpace() && discordField.Value.IsNotNullOrWhiteSpace()) diff --git a/src/NzbDrone.Core/Notifications/Discord/DiscordFieldType.cs b/src/NzbDrone.Core/Notifications/Discord/DiscordFieldType.cs index d0d9e8860..4853b736a 100644 --- a/src/NzbDrone.Core/Notifications/Discord/DiscordFieldType.cs +++ b/src/NzbDrone.Core/Notifications/Discord/DiscordFieldType.cs @@ -31,7 +31,9 @@ namespace NzbDrone.Core.Notifications.Discord Links, Release, Poster, - Fanart + Fanart, + CustomFormats, + CustomFormatScore } public enum DiscordManualInteractionFieldType