1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

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

This commit is contained in:
fhscholl 2017-10-28 11:19:49 -04:00 committed by Leonardo Galli
parent 5e121c78e1
commit 0a030386f2

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
@ -31,6 +31,7 @@ public override void OnGrab(GrabMessage message)
{
var movie = message.Movie;
var remoteMovie = message.RemoteMovie;
var quality = message.Quality;
var environmentVariables = new StringDictionary();
environmentVariables.Add("Radarr_EventType", "Grab");
@ -42,6 +43,8 @@ public override void OnGrab(GrabMessage message)
environmentVariables.Add("Radarr_Release_Indexer", remoteMovie.Release.Indexer);
environmentVariables.Add("Radarr_Release_Size", remoteMovie.Release.Size.ToString());
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);
}