From 9918535509152770a681127b900d665dc7d371a4 Mon Sep 17 00:00:00 2001 From: MxMarx Date: Mon, 25 Sep 2023 17:33:21 -0700 Subject: [PATCH] New: Author Added notification (cherry picked from commit https://github.com/Radarr/Radarr/commit/f890aadffa5ae579bcf65abdcf3e3948837084a9) --- .../Notifications/Notification.js | 12 ++++++++++ .../Notifications/NotificationEventItems.js | 13 +++++++++++ .../Store/Actions/Settings/notifications.js | 1 + .../NotificationBaseFixture.cs | 7 ++++++ .../038_add_on_author_add_to_notifications.cs | 14 +++++++++++ src/NzbDrone.Core/Datastore/TableMapping.cs | 1 + src/NzbDrone.Core/Localization/Core/en.json | 2 ++ .../Notifications/Apprise/Apprise.cs | 6 +++++ .../Notifications/Boxcar/Boxcar.cs | 6 +++++ .../CustomScript/CustomScript.cs | 13 +++++++++++ .../Notifications/Discord/Discord.cs | 23 +++++++++++++++++++ .../Notifications/Email/Email.cs | 8 +++++++ .../Notifications/Gotify/Gotify.cs | 6 +++++ .../Notifications/INotification.cs | 2 ++ src/NzbDrone.Core/Notifications/Join/Join.cs | 6 +++++ .../Notifications/Mailgun/Mailgun.cs | 6 +++++ .../Notifications/Notifiarr/Notifiarr.cs | 6 +++++ .../Notifications/NotificationBase.cs | 7 ++++++ .../Notifications/NotificationDefinition.cs | 4 +++- .../Notifications/NotificationFactory.cs | 12 ++++++++++ .../Notifications/NotificationService.cs | 21 +++++++++++++++++ src/NzbDrone.Core/Notifications/Ntfy/Ntfy.cs | 6 +++++ .../Notifications/Prowl/Prowl.cs | 6 +++++ .../Notifications/PushBullet/PushBullet.cs | 6 +++++ .../Notifications/Pushover/Pushover.cs | 6 +++++ .../Notifications/SendGrid/SendGrid.cs | 6 +++++ .../Notifications/Signal/Signal.cs | 6 +++++ .../Notifications/Simplepush/Simplepush.cs | 6 +++++ .../Notifications/Slack/Slack.cs | 15 ++++++++++++ .../Notifications/Subsonic/Subsonic.cs | 5 ++++ .../Notifications/Telegram/Telegram.cs | 6 +++++ .../Notifications/Twitter/Twitter.cs | 6 +++++ .../Notifications/Webhook/Webhook.cs | 5 ++++ .../Webhook/WebhookAuthorAddedPayload.cs | 7 ++++++ .../Notifications/Webhook/WebhookBase.cs | 10 ++++++++ .../Notifications/Webhook/WebhookEventType.cs | 1 + .../Notifications/NotificationResource.cs | 6 +++++ 37 files changed, 278 insertions(+), 1 deletion(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/038_add_on_author_add_to_notifications.cs create mode 100644 src/NzbDrone.Core/Notifications/Webhook/WebhookAuthorAddedPayload.cs diff --git a/frontend/src/Settings/Notifications/Notifications/Notification.js b/frontend/src/Settings/Notifications/Notifications/Notification.js index 6a469d02a..02399e112 100644 --- a/frontend/src/Settings/Notifications/Notifications/Notification.js +++ b/frontend/src/Settings/Notifications/Notifications/Notification.js @@ -60,6 +60,7 @@ class Notification extends Component { onReleaseImport, onUpgrade, onRename, + onAuthorAdded, onAuthorDelete, onBookDelete, onBookFileDelete, @@ -73,6 +74,7 @@ class Notification extends Component { supportsOnReleaseImport, supportsOnUpgrade, supportsOnRename, + supportsOnAuthorAdded, supportsOnAuthorDelete, supportsOnBookDelete, supportsOnBookFileDelete, @@ -136,6 +138,14 @@ class Notification extends Component { null } + { + supportsOnAuthorAdded && onAuthorAdded ? + : + null + } + { supportsOnAuthorDelete && onAuthorDelete ?