From 807460771e2222560b1504ea40438a50577a2ec3 Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 2 Oct 2020 22:51:00 -0400 Subject: [PATCH] New: Add DownloadClient and DownloadId to Webhook notifications Co-Authored-By: Mark McDowall --- src/NzbDrone.Core/Notifications/Webhook/Webhook.cs | 8 ++++++-- .../Notifications/Webhook/WebhookGrabPayload.cs | 2 ++ .../Notifications/Webhook/WebhookImportPayload.cs | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs index 40e062b93..a362786b6 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs @@ -34,7 +34,9 @@ namespace NzbDrone.Core.Notifications.Webhook QualityVersion = quality.Revision.Version, ReleaseGroup = remoteAlbum.ParsedAlbumInfo.ReleaseGroup }), - Release = new WebhookRelease(quality, remoteAlbum) + Release = new WebhookRelease(quality, remoteAlbum), + DownloadClient = message.DownloadClient, + DownloadId = message.DownloadId }; _proxy.SendWebhook(payload, Settings); @@ -56,7 +58,9 @@ namespace NzbDrone.Core.Notifications.Webhook ReleaseGroup = x.ReleaseGroup })).ToList(), TrackFiles = trackFiles.ConvertAll(x => new WebhookTrackFile(x)), - IsUpgrade = message.OldFiles.Any() + IsUpgrade = message.OldFiles.Any(), + DownloadClient = message.DownloadClient, + DownloadId = message.DownloadId }; _proxy.SendWebhook(payload, Settings); diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs index 4cb7c868b..af26b5560 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs @@ -6,5 +6,7 @@ namespace NzbDrone.Core.Notifications.Webhook { public List Albums { get; set; } public WebhookRelease Release { get; set; } + public string DownloadClient { get; set; } + public string DownloadId { get; set; } } } diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs index ec19633d7..5e367ce7f 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs @@ -7,5 +7,7 @@ namespace NzbDrone.Core.Notifications.Webhook public List Tracks { get; set; } public List TrackFiles { get; set; } public bool IsUpgrade { get; set; } + public string DownloadClient { get; set; } + public string DownloadId { get; set; } } }