mirror of
https://github.com/Readarr/Readarr
synced 2026-03-24 21:42:17 +01:00
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:
parent
8ffcc8a711
commit
6e595bfad3
3 changed files with 11 additions and 3 deletions
|
|
@ -34,7 +34,9 @@ public override void OnGrab(GrabMessage message)
|
|||
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 @@ public override void OnReleaseImport(BookDownloadMessage message)
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -6,5 +6,7 @@ public class WebhookGrabPayload : WebhookPayload
|
|||
{
|
||||
public List<WebhookBook> Books { get; set; }
|
||||
public WebhookRelease Release { get; set; }
|
||||
public string DownloadClient { get; set; }
|
||||
public string DownloadId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@ public class WebhookImportPayload : WebhookPayload
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue