mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-02 21:15:05 +00:00
New: Add Custom Format fields to Discord On Grab notifications
(cherry picked from commit 3a9182b6a6a322a03666592f8e08d4afde11ee86) Closes #3845 Closes #3874
This commit is contained in:
parent
c9a5dcf2d3
commit
59bc76ebe0
3 changed files with 13 additions and 3 deletions
|
@ -101,6 +101,14 @@ public override void OnGrab(GrabMessage message)
|
|||
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 @@ public enum DiscordGrabFieldType
|
|||
Release,
|
||||
Poster,
|
||||
Fanart,
|
||||
Indexer
|
||||
Indexer,
|
||||
CustomFormats,
|
||||
CustomFormatScore
|
||||
}
|
||||
|
||||
public enum DiscordImportFieldType
|
||||
|
|
|
@ -19,8 +19,8 @@ public class DiscordSettings : IProviderConfig
|
|||
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…
Reference in a new issue