From 2caf3c6725553958b8b5c212c8a3e2e1e42e4dc0 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 (cherry picked from commit a12cdb34bc0ab78937e3c3677012bf030923aebf) --- .../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 cf2817b48..0d5f4e7b5 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -254,15 +254,33 @@ namespace NzbDrone.Core.Notifications public void Handle(ManualInteractionRequiredEvent message) { + var movie = message.RemoteMovie.Movie; + var mess = ""; + + if (movie != null) + { + mess = GetMessage(movie, message.RemoteMovie.ParsedMovieInfo.Quality); + } + + if (mess.IsNullOrWhiteSpace() && message.TrackedDownload.DownloadItem != null) + { + mess = message.TrackedDownload.DownloadItem.Title; + } + + if (mess.IsNullOrWhiteSpace()) + { + return; + } + var manualInteractionMessage = new ManualInteractionRequiredMessage { - Message = GetMessage(message.RemoteMovie.Movie, message.RemoteMovie.ParsedMovieInfo.Quality), - Movie = message.RemoteMovie.Movie, + Message = mess, + Movie = movie, Quality = message.RemoteMovie.ParsedMovieInfo.Quality, RemoteMovie = message.RemoteMovie, 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 };