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>
This commit is contained in:
Qstick
2020-10-02 22:51:00 -04:00
committed by nitsua
parent 8ffcc8a711
commit 6e595bfad3
3 changed files with 11 additions and 3 deletions

View File

@@ -34,7 +34,9 @@ namespace NzbDrone.Core.Notifications.Webhook
QualityVersion = quality.Revision.Version,
ReleaseGroup = remoteBook.ParsedBookInfo.ReleaseGroup
}),
Release = new WebhookRelease(quality, remoteBook)
Release = new WebhookRelease(quality, remoteBook),
DownloadClient = message.DownloadClient,
DownloadId = message.DownloadId
};
_proxy.SendWebhook(payload, Settings);
@@ -47,10 +49,12 @@ namespace NzbDrone.Core.Notifications.Webhook
var payload = new WebhookImportPayload
{
EventType = "Download",
Author = new WebhookAuthor(message.Author),
Artist = new WebhookAuthor(message.Author),
Book = new WebhookBook(message.Book),
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);

View File

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

View File

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