From a12cdb34bc0ab78937e3c3677012bf030923aebf Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 3 Mar 2024 11:48:49 -0800 Subject: [PATCH] Fixed: Error sending Manual Interaction Required notification --- .../Notifications/NotificationService.cs | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index 1dbd1fe9d..649f69581 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -233,15 +233,33 @@ namespace NzbDrone.Core.Notifications public void Handle(ManualInteractionRequiredEvent message) { + var series = message.Episode.Series; + var mess = ""; + + if (series != null) + { + mess = GetMessage(series, message.Episode.Episodes, message.Episode.ParsedEpisodeInfo.Quality); + } + + if (mess.IsNullOrWhiteSpace() && message.TrackedDownload.DownloadItem != null) + { + mess = message.TrackedDownload.DownloadItem.Title; + } + + if (mess.IsNullOrWhiteSpace()) + { + return; + } + var manualInteractionMessage = new ManualInteractionRequiredMessage { - Message = GetMessage(message.Episode.Series, message.Episode.Episodes, message.Episode.ParsedEpisodeInfo.Quality), - Series = message.Episode.Series, + Message = mess, + Series = series, Quality = message.Episode.ParsedEpisodeInfo.Quality, Episode = message.Episode, TrackedDownload = message.TrackedDownload, - DownloadClientInfo = message.TrackedDownload.DownloadItem.DownloadClientInfo, - DownloadId = message.TrackedDownload.DownloadItem.DownloadId, + DownloadClientInfo = message.TrackedDownload.DownloadItem?.DownloadClientInfo, + DownloadId = message.TrackedDownload.DownloadItem?.DownloadId, Release = message.Release };