mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
parent
5e121c78e1
commit
0a030386f2
5
src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs
Normal file → Executable file
5
src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs
Normal file → Executable 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user