Added: Movie_Quality to onGrab (#2221) (Fixes #1833)

pull/2229/head
fhscholl 7 years ago committed by Leonardo Galli
parent 5e121c78e1
commit 0a030386f2

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.IO; using System.IO;
@ -31,6 +31,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
{ {
var movie = message.Movie; var movie = message.Movie;
var remoteMovie = message.RemoteMovie; var remoteMovie = message.RemoteMovie;
var quality = message.Quality;
var environmentVariables = new StringDictionary(); var environmentVariables = new StringDictionary();
environmentVariables.Add("Radarr_EventType", "Grab"); environmentVariables.Add("Radarr_EventType", "Grab");
@ -42,6 +43,8 @@ namespace NzbDrone.Core.Notifications.CustomScript
environmentVariables.Add("Radarr_Release_Indexer", remoteMovie.Release.Indexer); environmentVariables.Add("Radarr_Release_Indexer", remoteMovie.Release.Indexer);
environmentVariables.Add("Radarr_Release_Size", remoteMovie.Release.Size.ToString()); environmentVariables.Add("Radarr_Release_Size", remoteMovie.Release.Size.ToString());
environmentVariables.Add("Radarr_Release_ReleaseGroup", remoteMovie.ParsedMovieInfo.ReleaseGroup ?? string.Empty); environmentVariables.Add("Radarr_Release_ReleaseGroup", remoteMovie.ParsedMovieInfo.ReleaseGroup ?? string.Empty);
environmentVariables.Add("Radarr_Release_Quality", quality.Quality.Name);
environmentVariables.Add("Radarr_Release_QualityVersion", quality.Revision.Version.ToString());
ExecuteScript(environmentVariables); ExecuteScript(environmentVariables);
} }

Loading…
Cancel
Save