From 6fa98c5404c0c6198a488e140c61af0f451b16c9 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 (cherry picked from commit e16ace54a8120cd98007a09fe1e6136be3e699fc) --- 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 41c0ae0d7..4e303f88e 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -206,6 +206,14 @@ public override void OnReleaseImport(AlbumDownloadMessage message) discordField.Name = "Links"; discordField.Value = GetLinksString(artist); 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 515504dea..0335fe1dc 100644 --- a/src/NzbDrone.Core/Notifications/Discord/DiscordFieldType.cs +++ b/src/NzbDrone.Core/Notifications/Discord/DiscordFieldType.cs @@ -28,6 +28,8 @@ public enum DiscordImportFieldType Links, Release, Poster, - Fanart + Fanart, + CustomFormats, + CustomFormatScore } }