New: Add DownloadClient and DownloadId to Webhook notifications

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
Signed-off-by: Robin Dadswell <robin@dadswell.email>
pull/770/head
Qstick 4 years ago
parent bb504ec275
commit a9e03ed1cc

@ -34,7 +34,9 @@ namespace NzbDrone.Core.Notifications.Webhook
QualityVersion = quality.Revision.Version, QualityVersion = quality.Revision.Version,
ReleaseGroup = remoteBook.ParsedBookInfo.ReleaseGroup ReleaseGroup = remoteBook.ParsedBookInfo.ReleaseGroup
}), }),
Release = new WebhookRelease(quality, remoteBook) Release = new WebhookRelease(quality, remoteBook),
DownloadClient = message.DownloadClient,
DownloadId = message.DownloadId
}; };
_proxy.SendWebhook(payload, Settings); _proxy.SendWebhook(payload, Settings);
@ -47,10 +49,12 @@ namespace NzbDrone.Core.Notifications.Webhook
var payload = new WebhookImportPayload var payload = new WebhookImportPayload
{ {
EventType = "Download", EventType = "Download",
Author = new WebhookAuthor(message.Author), Artist = new WebhookAuthor(message.Author),
Book = new WebhookBook(message.Book), Book = new WebhookBook(message.Book),
BookFiles = bookFiles.ConvertAll(x => new WebhookBookFile(x)), BookFiles = bookFiles.ConvertAll(x => new WebhookBookFile(x)),
IsUpgrade = message.OldFiles.Any() IsUpgrade = message.OldFiles.Any(),
DownloadClient = message.DownloadClient,
DownloadId = message.DownloadId
}; };
_proxy.SendWebhook(payload, Settings); _proxy.SendWebhook(payload, Settings);

@ -6,5 +6,7 @@ namespace NzbDrone.Core.Notifications.Webhook
{ {
public List<WebhookBook> Books { get; set; } public List<WebhookBook> Books { get; set; }
public WebhookRelease Release { get; set; } public WebhookRelease Release { get; set; }
public string DownloadClient { get; set; }
public string DownloadId { get; set; }
} }
} }

@ -7,5 +7,7 @@ namespace NzbDrone.Core.Notifications.Webhook
public WebhookBook Book { get; set; } public WebhookBook Book { get; set; }
public List<WebhookBookFile> BookFiles { get; set; } public List<WebhookBookFile> BookFiles { get; set; }
public bool IsUpgrade { get; set; } public bool IsUpgrade { get; set; }
public string DownloadClient { get; set; }
public string DownloadId { get; set; }
} }
} }

Loading…
Cancel
Save