From dec6e140365981f0391a759db33f4f5de46adc24 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 14 Apr 2023 16:44:49 -0700 Subject: [PATCH] New: On Add Series connection event Closes #3637 --- .../Notifications/Notification.js | 12 +++++++++ .../Notifications/NotificationEventItems.js | 13 +++++++++ .../Store/Actions/Settings/notifications.js | 1 + .../187_add_on_series_add_to_notifications.cs | 14 ++++++++++ src/NzbDrone.Core/Datastore/TableMapping.cs | 1 + .../Notifications/Boxcar/Boxcar.cs | 5 ++++ .../CustomScript/CustomScript.cs | 21 +++++++++++++++ .../Notifications/Discord/Discord.cs | 18 +++++++++++++ .../Notifications/Email/Email.cs | 7 +++++ .../Notifications/Gotify/Gotify.cs | 5 ++++ .../Notifications/INotification.cs | 4 ++- src/NzbDrone.Core/Notifications/Join/Join.cs | 7 ++++- .../Notifications/Mailgun/Mailgun.cs | 7 +++++ .../MediaBrowser/MediaBrowser.cs | 13 +++++++++ .../Notifications/Notifiarr/Notifiarr.cs | 5 ++++ .../Notifications/NotificationBase.cs | 10 +++++-- .../Notifications/NotificationDefinition.cs | 6 +++-- .../Notifications/NotificationFactory.cs | 7 +++++ .../Notifications/NotificationService.cs | 26 ++++++++++++++++++ src/NzbDrone.Core/Notifications/Ntfy/Ntfy.cs | 5 ++++ .../Notifications/Plex/Server/PlexServer.cs | 5 ++++ .../Notifications/Prowl/Prowl.cs | 7 ++++- .../Notifications/PushBullet/PushBullet.cs | 5 ++++ .../Notifications/Pushover/Pushover.cs | 7 ++++- .../Notifications/SendGrid/SendGrid.cs | 7 ++++- .../Notifications/SeriesAddMessage.cs | 15 +++++++++++ .../Notifications/Simplepush/Simplepush.cs | 5 ++++ .../Notifications/Slack/Slack.cs | 15 +++++++++++ .../Notifications/Synology/SynologyIndexer.cs | 10 ++++++- .../Notifications/Telegram/Telegram.cs | 7 ++++- .../Notifications/Trakt/Trakt.cs | 27 +++++++++++++++++++ .../Notifications/Twitter/Twitter.cs | 7 ++++- .../Notifications/Webhook/Webhook.cs | 5 ++++ .../Notifications/Webhook/WebhookBase.cs | 11 ++++++++ .../Notifications/Webhook/WebhookEventType.cs | 3 ++- .../Webhook/WebhookSeriesAddPayload.cs | 9 +++++++ src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs | 8 ++++++ .../Tv/Events/SeriesAddCompletedEvent.cs | 14 ++++++++++ src/NzbDrone.Core/Tv/SeriesScannedHandler.cs | 8 +++++- .../Notifications/NotificationResource.cs | 6 +++++ 40 files changed, 354 insertions(+), 14 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/187_add_on_series_add_to_notifications.cs create mode 100644 src/NzbDrone.Core/Notifications/SeriesAddMessage.cs create mode 100644 src/NzbDrone.Core/Notifications/Webhook/WebhookSeriesAddPayload.cs create mode 100644 src/NzbDrone.Core/Tv/Events/SeriesAddCompletedEvent.cs diff --git a/frontend/src/Settings/Notifications/Notifications/Notification.js b/frontend/src/Settings/Notifications/Notifications/Notification.js index 675002532..2d564f773 100644 --- a/frontend/src/Settings/Notifications/Notifications/Notification.js +++ b/frontend/src/Settings/Notifications/Notifications/Notification.js @@ -58,6 +58,7 @@ class Notification extends Component { onDownload, onUpgrade, onRename, + onSeriesAdd, onSeriesDelete, onEpisodeFileDelete, onEpisodeFileDeleteForUpgrade, @@ -67,6 +68,7 @@ class Notification extends Component { supportsOnDownload, supportsOnUpgrade, supportsOnRename, + supportsOnSeriesAdd, supportsOnSeriesDelete, supportsOnEpisodeFileDelete, supportsOnEpisodeFileDeleteForUpgrade, @@ -132,6 +134,14 @@ class Notification extends Component { null } + { + supportsOnSeriesAdd && onSeriesAdd ? + : + null + } + { supportsOnSeriesDelete && onSeriesDelete ?