From 5ec282750bdea16f770282b80fdaec56a65749e2 Mon Sep 17 00:00:00 2001 From: Stickie Date: Mon, 17 Oct 2022 18:19:54 +0200 Subject: [PATCH] New: Notifications when Manual Interaction is required for importing Closes #5193 --- .../Notifications/Notification.js | 16 +++- .../Notifications/NotificationEventItems.js | 13 +++ .../Store/Actions/Settings/notifications.js | 1 + .../NotificationBaseFixture.cs | 7 ++ ...l_interaction_required_to_notifications.cs | 14 +++ src/NzbDrone.Core/Datastore/TableMapping.cs | 3 +- .../Download/CompletedDownloadService.cs | 9 ++ .../Download/EpisodeGrabbedEvent.cs | 2 +- .../ManualInteractionRequiredEvent.cs | 18 ++++ .../DownloadMonitoringService.cs | 6 ++ .../TrackedDownloads/TrackedDownload.cs | 3 +- .../TrackedDownloadService.cs | 3 +- .../Notifications/Apprise/Apprise.cs | 5 ++ .../Notifications/Boxcar/Boxcar.cs | 5 ++ .../CustomScript/CustomScript.cs | 26 ++++++ .../Notifications/Discord/Discord.cs | 90 +++++++++++++++++++ .../Notifications/Discord/DiscordFieldType.cs | 14 +++ .../Notifications/Discord/DiscordSettings.cs | 4 + .../Notifications/Email/Email.cs | 7 ++ .../Notifications/Gotify/Gotify.cs | 5 ++ .../Notifications/INotification.cs | 2 + src/NzbDrone.Core/Notifications/Join/Join.cs | 5 ++ .../Notifications/Mailgun/Mailgun.cs | 5 ++ .../ManualInteractionRequiredMessage.cs | 24 +++++ .../Notifications/Notifiarr/Notifiarr.cs | 5 ++ .../Notifications/NotificationBase.cs | 7 ++ .../Notifications/NotificationDefinition.cs | 4 +- .../Notifications/NotificationFactory.cs | 7 ++ .../Notifications/NotificationService.cs | 34 +++++++ src/NzbDrone.Core/Notifications/Ntfy/Ntfy.cs | 5 ++ .../Notifications/Prowl/Prowl.cs | 5 ++ .../Notifications/PushBullet/PushBullet.cs | 5 ++ .../Notifications/Pushover/Pushover.cs | 5 ++ .../Notifications/SendGrid/SendGrid.cs | 5 ++ .../Notifications/Simplepush/Simplepush.cs | 5 ++ .../Notifications/Slack/Slack.cs | 17 ++++ .../Notifications/Telegram/Telegram.cs | 5 ++ .../Notifications/Twitter/Twitter.cs | 5 ++ .../Notifications/Webhook/Webhook.cs | 5 ++ .../Notifications/Webhook/WebhookBase.cs | 17 ++++ .../Webhook/WebhookDownloadClientItem.cs | 26 ++++++ .../WebhookManualInteractionPayload.cs | 14 +++ src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs | 5 ++ .../Notifications/NotificationResource.cs | 6 ++ 44 files changed, 467 insertions(+), 7 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/177_add_on_manual_interaction_required_to_notifications.cs create mode 100644 src/NzbDrone.Core/Download/ManualInteractionRequiredEvent.cs create mode 100644 src/NzbDrone.Core/Notifications/ManualInteractionRequiredMessage.cs create mode 100644 src/NzbDrone.Core/Notifications/Webhook/WebhookDownloadClientItem.cs create mode 100644 src/NzbDrone.Core/Notifications/Webhook/WebhookManualInteractionPayload.cs diff --git a/frontend/src/Settings/Notifications/Notifications/Notification.js b/frontend/src/Settings/Notifications/Notifications/Notification.js index baf029184..a525a4e5f 100644 --- a/frontend/src/Settings/Notifications/Notifications/Notification.js +++ b/frontend/src/Settings/Notifications/Notifications/Notification.js @@ -65,6 +65,7 @@ class Notification extends Component { onHealthIssue, onHealthRestored, onApplicationUpdate, + onManualInteractionRequired, supportsOnGrab, supportsOnDownload, supportsOnUpgrade, @@ -75,7 +76,8 @@ class Notification extends Component { supportsOnEpisodeFileDeleteForUpgrade, supportsOnHealthIssue, supportsOnHealthRestored, - supportsOnApplicationUpdate + supportsOnApplicationUpdate, + supportsOnManualInteractionRequired } = this.props; return ( @@ -177,7 +179,15 @@ class Notification extends Component { } { - !onGrab && !onDownload && !onRename && !onHealthIssue && !onHealthRestored && !onApplicationUpdate && !onSeriesDelete && !onEpisodeFileDelete ? + supportsOnManualInteractionRequired && onManualInteractionRequired ? + : + null + } + + { + !onGrab && !onDownload && !onRename && !onHealthIssue && !onHealthRestored && !onApplicationUpdate && !onSeriesDelete && !onEpisodeFileDelete && !onManualInteractionRequired ?