From a1e622a3630c477f58aa2b775d189b32766594dc 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 (cherry picked from commit 5ec282750bdea16f770282b80fdaec56a65749e2) --- .../Notifications/Notification.js | 16 +++- .../Notifications/NotificationEventItems.js | 13 +++ .../Store/Actions/Settings/notifications.js | 1 + .../ProcessFixture.cs | 18 ++-- .../MatchesGrabSpecificationFixture.cs | 20 ++++- .../NotificationBaseFixture.cs | 7 ++ ...l_interaction_required_to_notifications.cs | 14 +++ src/NzbDrone.Core/Datastore/TableMapping.cs | 3 +- .../Download/CompletedDownloadService.cs | 15 +++- .../ManualInteractionRequiredEvent.cs | 20 +++++ .../DownloadMonitoringService.cs | 6 ++ .../TrackedDownloads/TrackedDownload.cs | 4 +- .../TrackedDownloadService.cs | 3 +- src/NzbDrone.Core/Localization/Core/en.json | 2 + .../Aggregators/AggregateReleaseInfo.cs | 15 +--- .../Notifications/Apprise/Apprise.cs | 5 ++ .../Notifications/Boxcar/Boxcar.cs | 5 ++ .../CustomScript/CustomScript.cs | 24 +++++ .../Notifications/Discord/Discord.cs | 89 +++++++++++++++++++ .../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 | 25 ++++++ .../Notifications/Notifiarr/Notifiarr.cs | 5 ++ .../Notifications/NotificationBase.cs | 7 ++ .../Notifications/NotificationDefinition.cs | 4 +- .../Notifications/NotificationFactory.cs | 7 ++ .../Notifications/NotificationService.cs | 35 ++++++++ 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 | 21 +++++ .../Webhook/WebhookDownloadClientItem.cs | 26 ++++++ .../Notifications/Webhook/WebhookEventType.cs | 3 +- .../WebhookManualInteractionPayload.cs | 13 +++ src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs | 5 ++ .../Parser/Model/GrabbedReleaseInfo.cs | 17 ++++ .../Notifications/NotificationResource.cs | 6 ++ 49 files changed, 524 insertions(+), 34 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/221_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 9fb6a1ef0..9030cc198 100644 --- a/frontend/src/Settings/Notifications/Notifications/Notification.js +++ b/frontend/src/Settings/Notifications/Notifications/Notification.js @@ -66,6 +66,7 @@ class Notification extends Component { onHealthIssue, onHealthRestored, onApplicationUpdate, + onManualInteractionRequired, supportsOnGrab, supportsOnDownload, supportsOnUpgrade, @@ -76,7 +77,8 @@ class Notification extends Component { supportsOnMovieFileDeleteForUpgrade, supportsOnHealthIssue, supportsOnHealthRestored, - supportsOnApplicationUpdate + supportsOnApplicationUpdate, + supportsOnManualInteractionRequired } = this.props; return ( @@ -178,7 +180,15 @@ class Notification extends Component { } { - !onGrab && !onDownload && !onRename && !onHealthIssue && !onHealthRestored && !onApplicationUpdate && !onMovieDelete && !onMovieFileDelete ? + supportsOnManualInteractionRequired && onManualInteractionRequired ? + : + null + } + + { + !onGrab && !onDownload && !onRename && !onHealthIssue && !onHealthRestored && !onApplicationUpdate && !onMovieDelete && !onMovieFileDelete && !onManualInteractionRequired ?