From cc283f64a3d95db3c6832b482b01f74c38ab9884 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 caba855de..ac8faa2a5 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs @@ -28,7 +28,9 @@ public override void OnGrab(GrabMessage message) EventType = "Grab", Movie = new WebhookMovie(message.Movie), RemoteMovie = new WebhookRemoteMovie(remoteMovie), - Release = new WebhookRelease(quality, remoteMovie) + Release = new WebhookRelease(quality, remoteMovie), + DownloadClient = message.DownloadClient, + DownloadId = message.DownloadId }; _proxy.SendWebhook(payload, Settings); @@ -44,7 +46,9 @@ public override void OnDownload(DownloadMessage message) Movie = new WebhookMovie(message.Movie), RemoteMovie = new WebhookRemoteMovie(message.Movie), MovieFile = new WebhookMovieFile(movieFile), - IsUpgrade = message.OldMovieFiles.Any() + IsUpgrade = message.OldMovieFiles.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 aac72ff6f..ab5a0424e 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs @@ -4,5 +4,7 @@ public class WebhookGrabPayload : WebhookPayload { public WebhookRemoteMovie RemoteMovie { 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 f89077cf2..6037b660c 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs @@ -5,5 +5,7 @@ public class WebhookImportPayload : WebhookPayload public WebhookRemoteMovie RemoteMovie { get; set; } public WebhookMovieFile MovieFile { get; set; } public bool IsUpgrade { get; set; } + public string DownloadClient { get; set; } + public string DownloadId { get; set; } } }