From 50886ac928cb6d4a984dfef08f04d6f202e0644f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 10 Mar 2020 23:58:34 -0700 Subject: [PATCH] More webook series properties New: IMDB and TvMaze IDs in Webhooks New: Series type in Webhooks --- .../Notifications/CustomScript/CustomScript.cs | 1 + src/NzbDrone.Core/Notifications/Webhook/WebhookSeries.cs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index f20e16286..e6995794d 100644 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -87,6 +87,7 @@ namespace NzbDrone.Core.Notifications.CustomScript environmentVariables.Add("Sonarr_EpisodeFile_EpisodeCount", episodeFile.Episodes.Value.Count.ToString()); environmentVariables.Add("Sonarr_EpisodeFile_RelativePath", episodeFile.RelativePath); environmentVariables.Add("Sonarr_EpisodeFile_Path", Path.Combine(series.Path, episodeFile.RelativePath)); + environmentVariables.Add("Sonarr_EpisodeFile_EpisodeIds", string.Join(",", episodeFile.Episodes.Value.Select(e => e.Id))); environmentVariables.Add("Sonarr_EpisodeFile_SeasonNumber", episodeFile.SeasonNumber.ToString()); environmentVariables.Add("Sonarr_EpisodeFile_EpisodeNumbers", string.Join(",", episodeFile.Episodes.Value.Select(e => e.EpisodeNumber))); environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDates", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDate))); diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookSeries.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookSeries.cs index 222f9eebb..cba4e8ba7 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookSeries.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookSeries.cs @@ -8,6 +8,9 @@ namespace NzbDrone.Core.Notifications.Webhook public string Title { get; set; } public string Path { get; set; } public int TvdbId { get; set; } + public int TvMazeId { get; set; } + public string ImdbId { get; set; } + public SeriesTypes Type { get; set; } public WebhookSeries() { } @@ -17,6 +20,9 @@ namespace NzbDrone.Core.Notifications.Webhook Title = series.Title; Path = series.Path; TvdbId = series.TvdbId; + TvMazeId = series.TvMazeId; + ImdbId = series.ImdbId; + Type = series.SeriesType; } } } \ No newline at end of file