From 15bafce8cc44e3a07accb85910b5c9e21942d744 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Wed, 29 Mar 2023 19:34:29 -0400 Subject: [PATCH] Add Overview to CustomScript and Webhook Notifications (#8239) * Add Overview to customscript --- src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs | 4 ++++ src/NzbDrone.Core/Notifications/Webhook/WebhookMovie.cs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index 7fa64e64b..cb6179a21 100755 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -62,6 +62,7 @@ public override void OnGrab(GrabMessage message) environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString()); environmentVariables.Add("Radarr_Movie_In_Cinemas_Date", movie.MovieMetadata.Value.InCinemas.ToString() ?? string.Empty); environmentVariables.Add("Radarr_Movie_Physical_Release_Date", movie.MovieMetadata.Value.PhysicalRelease.ToString() ?? string.Empty); + environmentVariables.Add("Radarr_Movie_Overview", movie.MovieMetadata.Value.Overview); environmentVariables.Add("Radarr_Release_Title", remoteMovie.Release.Title); environmentVariables.Add("Radarr_Release_Indexer", remoteMovie.Release.Indexer ?? string.Empty); environmentVariables.Add("Radarr_Release_Size", remoteMovie.Release.Size.ToString()); @@ -97,6 +98,7 @@ public override void OnDownload(DownloadMessage message) environmentVariables.Add("Radarr_Movie_TmdbId", movie.MovieMetadata.Value.TmdbId.ToString()); environmentVariables.Add("Radarr_Movie_In_Cinemas_Date", movie.MovieMetadata.Value.InCinemas.ToString() ?? string.Empty); environmentVariables.Add("Radarr_Movie_Physical_Release_Date", movie.MovieMetadata.Value.PhysicalRelease.ToString() ?? string.Empty); + environmentVariables.Add("Radarr_Movie_Overview", movie.MovieMetadata.Value.Overview); environmentVariables.Add("Radarr_MovieFile_Id", movieFile.Id.ToString()); environmentVariables.Add("Radarr_MovieFile_RelativePath", movieFile.RelativePath); environmentVariables.Add("Radarr_MovieFile_Path", Path.Combine(movie.Path, movieFile.RelativePath)); @@ -190,6 +192,7 @@ public override void OnMovieFileDelete(MovieFileDeleteMessage deleteMessage) 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()); + environmentVariables.Add("Radarr_Movie_Overview", movie.MovieMetadata.Value.Overview); environmentVariables.Add("Radarr_MovieFile_Id", movieFile.Id.ToString()); environmentVariables.Add("Radarr_MovieFile_RelativePath", movieFile.RelativePath); environmentVariables.Add("Radarr_MovieFile_Path", Path.Combine(movie.Path, movieFile.RelativePath)); @@ -217,6 +220,7 @@ public override void OnMovieDelete(MovieDeleteMessage deleteMessage) 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_DeletedFiles", deleteMessage.DeletedFiles.ToString()); + environmentVariables.Add("Radarr_Movie_Overview", movie.MovieMetadata.Value.Overview); if (deleteMessage.DeletedFiles && movie.MovieFile != null) { diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookMovie.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookMovie.cs index d80ac0478..f59d41ed6 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookMovie.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookMovie.cs @@ -14,6 +14,7 @@ public class WebhookMovie public string FolderPath { get; set; } public int TmdbId { get; set; } public string ImdbId { get; set; } + public string Overview { get; set; } public WebhookMovie() { @@ -28,6 +29,7 @@ public WebhookMovie(Movie movie) FolderPath = movie.Path; TmdbId = movie.TmdbId; ImdbId = movie.ImdbId; + Overview = movie.MovieMetadata.Value.Overview; } public WebhookMovie(Movie movie, MovieFile movieFile)