1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-19 17:32:38 +01:00

Fixed: Align DownloadClientInfo in ManualInteractionRequiredMessage with DownloadMessage

Also handle null ref exceptions when DownloadClientInfo is null in notification service
This commit is contained in:
Qstick 2024-02-11 17:56:35 -06:00
parent 5f624a147b
commit 173b1d6a4c
4 changed files with 7 additions and 8 deletions

View File

@ -323,8 +323,8 @@ public override void OnManualInteractionRequired(ManualInteractionRequiredMessag
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
environmentVariables.Add("Radarr_Movie_Overview", movie.MovieMetadata.Value.Overview);
environmentVariables.Add("Radarr_Download_Client", message.DownloadClientName ?? string.Empty);
environmentVariables.Add("Radarr_Download_Client_Type", message.DownloadClientType ?? string.Empty);
environmentVariables.Add("Radarr_Download_Client", message.DownloadClientInfo?.Name ?? string.Empty);
environmentVariables.Add("Radarr_Download_Client_Type", message.DownloadClientInfo?.Type ?? string.Empty);
environmentVariables.Add("Radarr_Download_Id", message.DownloadId ?? string.Empty);
environmentVariables.Add("Radarr_Download_Size", message.TrackedDownload.DownloadItem.TotalSize.ToString());
environmentVariables.Add("Radarr_Download_Title", message.TrackedDownload.DownloadItem.Title);

View File

@ -1,3 +1,4 @@
using NzbDrone.Core.Download;
using NzbDrone.Core.Download.TrackedDownloads;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Parser.Model;
@ -12,8 +13,7 @@ public class ManualInteractionRequiredMessage
public RemoteMovie RemoteMovie { get; set; }
public TrackedDownload TrackedDownload { get; set; }
public QualityModel Quality { get; set; }
public string DownloadClientType { get; set; }
public string DownloadClientName { get; set; }
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
public string DownloadId { get; set; }
public GrabbedReleaseInfo Release { get; set; }

View File

@ -261,8 +261,7 @@ public void Handle(ManualInteractionRequiredEvent message)
Quality = message.RemoteMovie.ParsedMovieInfo.Quality,
RemoteMovie = message.RemoteMovie,
TrackedDownload = message.TrackedDownload,
DownloadClientType = message.TrackedDownload.DownloadItem.DownloadClientInfo.Type,
DownloadClientName = message.TrackedDownload.DownloadItem.DownloadClientInfo.Name,
DownloadClientInfo = message.TrackedDownload.DownloadItem.DownloadClientInfo,
DownloadId = message.TrackedDownload.DownloadItem.DownloadId,
Release = message.Release
};

View File

@ -209,8 +209,8 @@ protected WebhookManualInteractionPayload BuildManualInteractionRequiredPayload(
Tags = GetTagLabels(message.Movie)
},
DownloadInfo = new WebhookDownloadClientItem(quality, message.TrackedDownload.DownloadItem),
DownloadClient = message.DownloadClientName,
DownloadClientType = message.DownloadClientType,
DownloadClient = message.DownloadClientInfo?.Name,
DownloadClientType = message.DownloadClientInfo?.Type,
DownloadId = message.DownloadId,
CustomFormatInfo = new WebhookCustomFormatInfo(remoteMovie.CustomFormats, remoteMovie.CustomFormatScore),
Release = new WebhookGrabbedRelease(message.Release)