Added: Radarr_Download_Id and Radarr_Download_Client to the environment (#3276)

Fixes #3232
pull/2/head
Logan 6 years ago committed by Leonardo Galli
parent f411903e90
commit cc44d022b3

@ -46,6 +46,8 @@ namespace NzbDrone.Core.Notifications.CustomScript
environmentVariables.Add("Radarr_Release_Quality", quality.Quality.Name); environmentVariables.Add("Radarr_Release_Quality", quality.Quality.Name);
environmentVariables.Add("Radarr_Release_QualityVersion", quality.Revision.Version.ToString()); environmentVariables.Add("Radarr_Release_QualityVersion", quality.Revision.Version.ToString());
environmentVariables.Add("Radarr_IndexerFlags", remoteMovie.Release.IndexerFlags.ToString()); environmentVariables.Add("Radarr_IndexerFlags", remoteMovie.Release.IndexerFlags.ToString());
environmentVariables.Add("Radarr_Download_Client", message.DownloadClient ?? string.Empty);
environmentVariables.Add("Radarr_Download_Id", message.DownloadId ?? string.Empty);
ExecuteScript(environmentVariables); ExecuteScript(environmentVariables);
} }

@ -1,4 +1,4 @@
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Qualities; using NzbDrone.Core.Qualities;
using NzbDrone.Core.Movies; using NzbDrone.Core.Movies;
@ -9,7 +9,9 @@ namespace NzbDrone.Core.Notifications
public string Message { get; set; } public string Message { get; set; }
public Movie Movie { get; set; } public Movie Movie { get; set; }
public RemoteMovie RemoteMovie { get; set; } public RemoteMovie RemoteMovie { get; set; }
public QualityModel Quality { get; set; } public QualityModel Quality { get; set; }
public string DownloadClient { get; set; }
public string DownloadId { get; set; }
public override string ToString() public override string ToString()
{ {

@ -72,7 +72,9 @@ namespace NzbDrone.Core.Notifications
Message = GetMessage(message.Movie.Movie, message.Movie.ParsedMovieInfo.Quality), Message = GetMessage(message.Movie.Movie, message.Movie.ParsedMovieInfo.Quality),
Quality = message.Movie.ParsedMovieInfo.Quality, Quality = message.Movie.ParsedMovieInfo.Quality,
Movie = message.Movie.Movie, Movie = message.Movie.Movie,
RemoteMovie = message.Movie RemoteMovie = message.Movie,
DownloadClient = message.DownloadClient,
DownloadId = message.DownloadId
}; };
foreach (var notification in _notificationFactory.OnGrabEnabled()) foreach (var notification in _notificationFactory.OnGrabEnabled())

Loading…
Cancel
Save