New: Add Custom Format fields to Discord On Grab notifications

Closes #5769
This commit is contained in:
jack-mil 2023-07-10 23:50:46 -04:00 committed by GitHub
parent 3f0268b79f
commit 3a9182b6a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -101,6 +101,14 @@ namespace NzbDrone.Core.Notifications.Discord
discordField.Name = "Links";
discordField.Value = GetLinksString(series);
break;
case DiscordGrabFieldType.CustomFormats:
discordField.Name = "Custom Formats";
discordField.Value = string.Join("|", message.Episode.CustomFormats);
break;
case DiscordGrabFieldType.CustomFormatScore:
discordField.Name = "Custom Format Score";
discordField.Value = message.Episode.CustomFormatScore.ToString();
break;
case DiscordGrabFieldType.Indexer:
discordField.Name = "Indexer";
discordField.Value = message.Episode.Release.Indexer;

View File

@ -12,6 +12,8 @@ namespace NzbDrone.Core.Notifications.Discord
Release,
Poster,
Fanart,
CustomFormats,
CustomFormatScore,
Indexer
}

View File

@ -19,7 +19,7 @@ namespace NzbDrone.Core.Notifications.Discord
public DiscordSettings()
{
// Set Default Fields
GrabFields = new[] { 0, 1, 2, 3, 5, 6, 7, 8, 9 };
GrabFields = new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
ImportFields = new[] { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12 };
ManualInteractionFields = new[] { 0, 1, 2, 3, 5, 6, 7, 8, 9 };
}