|
|
|
@ -64,6 +64,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
var environmentVariables = new StringDictionary();
|
|
|
|
|
|
|
|
|
|
environmentVariables.Add("Sonarr_EventType", "Download");
|
|
|
|
|
environmentVariables.Add("Sonarr_IsUpgrade", message.OldFiles.Any().ToString());
|
|
|
|
|
environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Sonarr_Series_Title", series.Title);
|
|
|
|
|
environmentVariables.Add("Sonarr_Series_Path", series.Path);
|
|
|
|
@ -85,6 +86,12 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Sonarr_EpisodeFile_SourcePath", sourcePath);
|
|
|
|
|
environmentVariables.Add("Sonarr_EpisodeFile_SourceFolder", Path.GetDirectoryName(sourcePath));
|
|
|
|
|
|
|
|
|
|
if (message.OldFiles.Any())
|
|
|
|
|
{
|
|
|
|
|
environmentVariables.Add("Sonarr_DeletedRelativePaths", string.Join("|", message.OldFiles.Select(e => e.RelativePath)));
|
|
|
|
|
environmentVariables.Add("Sonarr_DeletedPaths", string.Join("|", message.OldFiles.Select(e => Path.Combine(series.Path, e.RelativePath))));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ExecuteScript(environmentVariables);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|