diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs index a5a1dec6d..d114a88db 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs @@ -178,6 +178,8 @@ namespace NzbDrone.Core.Notifications.Webhook DownloadClient = message.DownloadClientInfo?.Name, DownloadClientType = message.DownloadClientInfo?.Type, DownloadId = message.DownloadId, + DownloadStatus = message.TrackedDownload.Status.ToString(), + DownloadStatusMessages = message.TrackedDownload.StatusMessages.Select(x => new WebhookDownloadStatusMessage(x)).ToList(), CustomFormatInfo = new WebhookCustomFormatInfo(remoteEpisode.CustomFormats, remoteEpisode.CustomFormatScore), Release = new WebhookGrabbedRelease(message.Release) }; diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookDownloadStatusMessage.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookDownloadStatusMessage.cs new file mode 100644 index 000000000..5e8b47870 --- /dev/null +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookDownloadStatusMessage.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Linq; +using NzbDrone.Core.Download.TrackedDownloads; + +namespace NzbDrone.Core.Notifications.Webhook +{ + public class WebhookDownloadStatusMessage + { + public string Title { get; set; } + public List Messages { get; set; } + + public WebhookDownloadStatusMessage(TrackedDownloadStatusMessage statusMessage) + { + Title = statusMessage.Title; + Messages = statusMessage.Messages.ToList(); + } + } +} diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookManualInteractionPayload.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookManualInteractionPayload.cs index fca226f4b..b217f9284 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookManualInteractionPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookManualInteractionPayload.cs @@ -10,6 +10,8 @@ namespace NzbDrone.Core.Notifications.Webhook public string DownloadClient { get; set; } public string DownloadClientType { get; set; } public string DownloadId { get; set; } + public string DownloadStatus { get; set; } + public List DownloadStatusMessages { get; set; } public WebhookCustomFormatInfo CustomFormatInfo { get; set; } public WebhookGrabbedRelease Release { get; set; } }