1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

New: Add DownloadClient and DownloadId to Webhook notifications

This commit is contained in:
Mark McDowall 2020-05-02 21:02:04 -07:00 committed by Qstick
parent 5ddc63c673
commit cc283f64a3
3 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,9 @@ public override void OnGrab(GrabMessage message)
EventType = "Grab", EventType = "Grab",
Movie = new WebhookMovie(message.Movie), Movie = new WebhookMovie(message.Movie),
RemoteMovie = new WebhookRemoteMovie(remoteMovie), RemoteMovie = new WebhookRemoteMovie(remoteMovie),
Release = new WebhookRelease(quality, remoteMovie) Release = new WebhookRelease(quality, remoteMovie),
DownloadClient = message.DownloadClient,
DownloadId = message.DownloadId
}; };
_proxy.SendWebhook(payload, Settings); _proxy.SendWebhook(payload, Settings);
@ -44,7 +46,9 @@ public override void OnDownload(DownloadMessage message)
Movie = new WebhookMovie(message.Movie), Movie = new WebhookMovie(message.Movie),
RemoteMovie = new WebhookRemoteMovie(message.Movie), RemoteMovie = new WebhookRemoteMovie(message.Movie),
MovieFile = new WebhookMovieFile(movieFile), MovieFile = new WebhookMovieFile(movieFile),
IsUpgrade = message.OldMovieFiles.Any() IsUpgrade = message.OldMovieFiles.Any(),
DownloadClient = message.DownloadClient,
DownloadId = message.DownloadId
}; };
_proxy.SendWebhook(payload, Settings); _proxy.SendWebhook(payload, Settings);

View File

@ -4,5 +4,7 @@ public class WebhookGrabPayload : WebhookPayload
{ {
public WebhookRemoteMovie RemoteMovie { get; set; } public WebhookRemoteMovie RemoteMovie { get; set; }
public WebhookRelease Release { get; set; } public WebhookRelease Release { get; set; }
public string DownloadClient { get; set; }
public string DownloadId { get; set; }
} }
} }

View File

@ -5,5 +5,7 @@ public class WebhookImportPayload : WebhookPayload
public WebhookRemoteMovie RemoteMovie { get; set; } public WebhookRemoteMovie RemoteMovie { get; set; }
public WebhookMovieFile MovieFile { get; set; } public WebhookMovieFile MovieFile { get; set; }
public bool IsUpgrade { get; set; } public bool IsUpgrade { get; set; }
public string DownloadClient { get; set; }
public string DownloadId { get; set; }
} }
} }