1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Separate event types for series and episode deletions

This commit is contained in:
Mark McDowall 2021-01-24 12:17:01 -08:00
parent f5d690aa7b
commit a510c9e86d
2 changed files with 4 additions and 3 deletions

View File

@ -80,7 +80,7 @@ public override void OnEpisodeFileDelete(EpisodeDeleteMessage deleteMessage)
{ {
var payload = new WebhookEpisodeDeletePayload var payload = new WebhookEpisodeDeletePayload
{ {
EventType = WebhookEventType.Delete, EventType = WebhookEventType.EpisodeFileDelete,
Series = new WebhookSeries(deleteMessage.Series), Series = new WebhookSeries(deleteMessage.Series),
Episodes = deleteMessage.EpisodeFile.Episodes.Value.ConvertAll(x => new WebhookEpisode(x)) Episodes = deleteMessage.EpisodeFile.Episodes.Value.ConvertAll(x => new WebhookEpisode(x))
}; };
@ -91,7 +91,7 @@ public override void OnSeriesDelete(SeriesDeleteMessage deleteMessage)
{ {
var payload = new WebhookSeriesDeletePayload var payload = new WebhookSeriesDeletePayload
{ {
EventType = WebhookEventType.Delete, EventType = WebhookEventType.SeriesDelete,
Series = new WebhookSeries(deleteMessage.Series), Series = new WebhookSeries(deleteMessage.Series),
DeletedFiles = deleteMessage.DeletedFiles DeletedFiles = deleteMessage.DeletedFiles
}; };

View File

@ -12,7 +12,8 @@ public enum WebhookEventType
Grab, Grab,
Download, Download,
Rename, Rename,
Delete, SeriesDelete,
EpisodeFileDelete,
Health Health
} }
} }