New: Add Custom Format fields to Discord On Grab notifications

(cherry picked from commit 3a9182b6a6a322a03666592f8e08d4afde11ee86)

Closes #3845
Closes #3874
pull/3876/head
jack-mil 12 months ago committed by Bogdan
parent c9a5dcf2d3
commit 59bc76ebe0

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

@ -12,7 +12,9 @@ namespace NzbDrone.Core.Notifications.Discord
Release,
Poster,
Fanart,
Indexer
Indexer,
CustomFormats,
CustomFormatScore
}
public enum DiscordImportFieldType

@ -19,8 +19,8 @@ namespace NzbDrone.Core.Notifications.Discord
public DiscordSettings()
{
// Set Default Fields
GrabFields = new int[] { 0, 1, 2, 3, 5, 6, 7, 8, 9 };
ImportFields = new int[] { 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, 5, 6, 7, 8, 9 };
}
private static readonly DiscordSettingsValidator Validator = new DiscordSettingsValidator();

Loading…
Cancel
Save