diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index 5936fb684..7a15f5281 100755 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -57,7 +57,8 @@ namespace NzbDrone.Core.Notifications.CustomScript environmentVariables.Add("Radarr_Release_Quality", quality.Quality.Name); environmentVariables.Add("Radarr_Release_QualityVersion", quality.Revision.Version.ToString()); environmentVariables.Add("Radarr_IndexerFlags", remoteMovie.Release.IndexerFlags.ToString()); - environmentVariables.Add("Radarr_Download_Client", message.DownloadClient ?? string.Empty); + environmentVariables.Add("Radarr_Download_Client", message.DownloadClientName ?? string.Empty); + environmentVariables.Add("Radarr_Download_Client_Type", message.DownloadClientType ?? string.Empty); environmentVariables.Add("Radarr_Download_Id", message.DownloadId ?? string.Empty); ExecuteScript(environmentVariables); @@ -89,8 +90,9 @@ namespace NzbDrone.Core.Notifications.CustomScript environmentVariables.Add("Radarr_MovieFile_SceneName", movieFile.SceneName ?? string.Empty); environmentVariables.Add("Radarr_MovieFile_SourcePath", sourcePath); environmentVariables.Add("Radarr_MovieFile_SourceFolder", Path.GetDirectoryName(sourcePath)); + 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_Client", message.DownloadClient ?? string.Empty); if (message.OldMovieFiles.Any()) { diff --git a/src/NzbDrone.Core/Notifications/DownloadMessage.cs b/src/NzbDrone.Core/Notifications/DownloadMessage.cs index d0832e231..a11a1827c 100644 --- a/src/NzbDrone.Core/Notifications/DownloadMessage.cs +++ b/src/NzbDrone.Core/Notifications/DownloadMessage.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using NzbDrone.Core.Download; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Movies; @@ -11,7 +12,7 @@ namespace NzbDrone.Core.Notifications public MovieFile MovieFile { get; set; } public List OldMovieFiles { get; set; } public string SourcePath { get; set; } - public string DownloadClient { get; set; } + public DownloadClientItemClientInfo DownloadClientInfo { get; set; } public string DownloadId { get; set; } public override string ToString() diff --git a/src/NzbDrone.Core/Notifications/GrabMessage.cs b/src/NzbDrone.Core/Notifications/GrabMessage.cs index 0a6d6488f..44971da7d 100644 --- a/src/NzbDrone.Core/Notifications/GrabMessage.cs +++ b/src/NzbDrone.Core/Notifications/GrabMessage.cs @@ -10,7 +10,8 @@ namespace NzbDrone.Core.Notifications public Movie Movie { get; set; } public RemoteMovie RemoteMovie { get; set; } public QualityModel Quality { get; set; } - public string DownloadClient { get; set; } + public string DownloadClientType { get; set; } + public string DownloadClientName { get; set; } public string DownloadId { get; set; } public override string ToString() diff --git a/src/NzbDrone.Core/Notifications/Notifiarr/Notifiarr.cs b/src/NzbDrone.Core/Notifications/Notifiarr/Notifiarr.cs index 120e9d479..97893d3a2 100644 --- a/src/NzbDrone.Core/Notifications/Notifiarr/Notifiarr.cs +++ b/src/NzbDrone.Core/Notifications/Notifiarr/Notifiarr.cs @@ -43,7 +43,8 @@ namespace NzbDrone.Core.Notifications.Notifiarr variables.Add("Radarr_Release_Quality", quality.Quality.Name); variables.Add("Radarr_Release_QualityVersion", quality.Revision.Version.ToString()); variables.Add("Radarr_IndexerFlags", remoteMovie.Release.IndexerFlags.ToString()); - variables.Add("Radarr_Download_Client", message.DownloadClient ?? string.Empty); + variables.Add("Radarr_Download_Client", message.DownloadClientName ?? string.Empty); + variables.Add("Radarr_Download_Client_Type", message.DownloadClientType ?? string.Empty); variables.Add("Radarr_Download_Id", message.DownloadId ?? string.Empty); _proxy.SendNotification(variables, Settings); @@ -76,7 +77,8 @@ namespace NzbDrone.Core.Notifications.Notifiarr variables.Add("Radarr_MovieFile_SourcePath", sourcePath); variables.Add("Radarr_MovieFile_SourceFolder", Path.GetDirectoryName(sourcePath)); variables.Add("Radarr_Download_Id", message.DownloadId ?? string.Empty); - variables.Add("Radarr_Download_Client", message.DownloadClient ?? string.Empty); + variables.Add("Radarr_Download_Client", message.DownloadClientInfo?.Name ?? string.Empty); + variables.Add("Radarr_Download_Client_Type", message.DownloadClientInfo?.Type ?? string.Empty); if (message.OldMovieFiles.Any()) { diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index 582436214..b43835ce3 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -95,7 +95,8 @@ namespace NzbDrone.Core.Notifications Quality = message.Movie.ParsedMovieInfo.Quality, Movie = message.Movie.Movie, RemoteMovie = message.Movie, - DownloadClient = message.DownloadClient, + DownloadClientType = message.DownloadClient, + DownloadClientName = message.DownloadClientName, DownloadId = message.DownloadId }; @@ -131,7 +132,7 @@ namespace NzbDrone.Core.Notifications Movie = message.MovieInfo.Movie, OldMovieFiles = message.OldFiles, SourcePath = message.MovieInfo.Path, - DownloadClient = message.DownloadClientInfo?.Name, + DownloadClientInfo = message.DownloadClientInfo, DownloadId = message.DownloadId }; diff --git a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs index 4b4638f12..5268b1ee7 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs @@ -31,7 +31,8 @@ namespace NzbDrone.Core.Notifications.Webhook Movie = new WebhookMovie(message.Movie), RemoteMovie = new WebhookRemoteMovie(remoteMovie), Release = new WebhookRelease(quality, remoteMovie), - DownloadClient = message.DownloadClient, + DownloadClient = message.DownloadClientName, + DownloadClientType = message.DownloadClientType, DownloadId = message.DownloadId }; @@ -49,7 +50,8 @@ namespace NzbDrone.Core.Notifications.Webhook RemoteMovie = new WebhookRemoteMovie(message.Movie), MovieFile = new WebhookMovieFile(movieFile), IsUpgrade = message.OldMovieFiles.Any(), - DownloadClient = message.DownloadClient, + DownloadClient = message.DownloadClientInfo.Name, + DownloadClientType = message.DownloadClientInfo.Type, DownloadId = message.DownloadId }; diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs index 88abd5571..431fa5558 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookGrabPayload.cs @@ -6,6 +6,7 @@ namespace NzbDrone.Core.Notifications.Webhook public WebhookRemoteMovie RemoteMovie { get; set; } public WebhookRelease Release { get; set; } public string DownloadClient { get; set; } + public string DownloadClientType { get; set; } public string DownloadId { get; set; } } } diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs index f1795837b..b4d0306b7 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookImportPayload.cs @@ -9,6 +9,7 @@ namespace NzbDrone.Core.Notifications.Webhook public WebhookMovieFile MovieFile { get; set; } public bool IsUpgrade { get; set; } public string DownloadClient { get; set; } + public string DownloadClientType { get; set; } public string DownloadId { get; set; } public List DeletedFiles { get; set; } }