|
|
|
@ -13,6 +13,8 @@ using NzbDrone.Core.HealthCheck;
|
|
|
|
|
using NzbDrone.Core.MediaFiles;
|
|
|
|
|
using NzbDrone.Core.MediaFiles.MediaInfo;
|
|
|
|
|
using NzbDrone.Core.Movies;
|
|
|
|
|
using NzbDrone.Core.Parser;
|
|
|
|
|
using NzbDrone.Core.Tags;
|
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
|
@ -24,18 +26,21 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
private readonly IConfigService _configService;
|
|
|
|
|
private readonly IDiskProvider _diskProvider;
|
|
|
|
|
private readonly IProcessProvider _processProvider;
|
|
|
|
|
private readonly ITagRepository _tagRepository;
|
|
|
|
|
private readonly Logger _logger;
|
|
|
|
|
|
|
|
|
|
public CustomScript(IConfigFileProvider configFileProvider,
|
|
|
|
|
IConfigService configService,
|
|
|
|
|
IDiskProvider diskProvider,
|
|
|
|
|
IProcessProvider processProvider,
|
|
|
|
|
ITagRepository tagRepository,
|
|
|
|
|
Logger logger)
|
|
|
|
|
{
|
|
|
|
|
_configFileProvider = configFileProvider;
|
|
|
|
|
_configService = configService;
|
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
|
_processProvider = processProvider;
|
|
|
|
|
_tagRepository = tagRepository;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -58,6 +63,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.MovieMetadata.Value.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.MovieMetadata.Value.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_In_Cinemas_Date", movie.MovieMetadata.Value.InCinemas.ToString() ?? string.Empty);
|
|
|
|
@ -93,6 +101,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.MovieMetadata.Value.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.MovieMetadata.Value.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Path", movie.Path);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
@ -146,6 +157,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.MovieMetadata.Value.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.MovieMetadata.Value.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Path", movie.Path);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
@ -170,6 +184,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.MovieMetadata.Value.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.MovieMetadata.Value.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Path", movie.Path);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
@ -192,6 +209,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Path", movie.Path);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
@ -219,6 +239,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.MovieMetadata.Value.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.MovieMetadata.Value.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Path", movie.Path);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
@ -288,6 +311,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Title", movie.MovieMetadata.Value.Title);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Year", movie.MovieMetadata.Value.Year.ToString());
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_OriginalLanguage", IsoLanguages.Get(movie.MovieMetadata.Value.OriginalLanguage).ThreeLetterCode);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Genres", string.Join("|", movie.MovieMetadata.Value.Genres));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Tags", string.Join("|", movie.Tags.Select(t => _tagRepository.Get(t).Label)));
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_Path", movie.Path);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_ImdbId", movie.MovieMetadata.Value.ImdbId ?? string.Empty);
|
|
|
|
|
environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString());
|
|
|
|
|