From 5d9dfee3c047c6ef9c63bf4991b7c2a79a53c617 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 2 May 2020 21:02:04 -0700 Subject: [PATCH] New: Add DownloadClient and DownloadId to Webhook notifications --- 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 49037b701..f769d83f9 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 = remoteEpisode.ParsedEpisodeInfo.ReleaseGroup }), - Release = new WebhookRelease(quality, remoteEpisode) + Release = new WebhookRelease(quality, remoteEpisode), + DownloadClient = message.DownloadClient, + DownloadId = message.DownloadId }; _proxy.SendWebhook(payload, Settings); @@ -57,7 +59,9 @@ namespace NzbDrone.Core.Notifications.Webhook SceneName = episodeFile.SceneName }), EpisodeFile = new WebhookEpisodeFile(episodeFile), - 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 2498f9c96..cb5d90abd 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 Episodes { 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 bc765b8dc..f6f516c14 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 Episodes { get; set; } public WebhookEpisodeFile EpisodeFile { get; set; } public bool IsUpgrade { get; set; } + public string DownloadClient { get; set; } + public string DownloadId { get; set; } } }