From 2958faf4a82eabd3166a239f278559210a86ef06 Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 17 Oct 2022 22:53:48 -0500 Subject: [PATCH] Add import date to upgraded episodes in CustomScript and Webhook connections Fixes #7547 Co-Authored-By: Mark McDowall --- src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs | 1 + src/NzbDrone.Core/Notifications/Webhook/WebhookMovieFile.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index 6aa5f8642..e7ab686f9 100755 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -100,6 +100,7 @@ namespace NzbDrone.Core.Notifications.CustomScript { environmentVariables.Add("Radarr_DeletedRelativePaths", string.Join("|", message.OldMovieFiles.Select(e => e.RelativePath))); environmentVariables.Add("Radarr_DeletedPaths", string.Join("|", message.OldMovieFiles.Select(e => Path.Combine(movie.Path, e.RelativePath)))); + environmentVariables.Add("Radarr_DeletedDateAdded", string.Join("|", message.OldMovieFiles.Select(e => e.DateAdded))); } ExecuteScript(environmentVariables); diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookMovieFile.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookMovieFile.cs index 7b69e3a8e..3d1476af3 100755 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookMovieFile.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookMovieFile.cs @@ -1,3 +1,4 @@ +using System; using NzbDrone.Core.MediaFiles; namespace NzbDrone.Core.Notifications.Webhook @@ -19,6 +20,7 @@ namespace NzbDrone.Core.Notifications.Webhook SceneName = movieFile.SceneName; IndexerFlags = movieFile.IndexerFlags.ToString(); Size = movieFile.Size; + DateAdded = movieFile.DateAdded; } public int Id { get; set; } @@ -30,5 +32,6 @@ namespace NzbDrone.Core.Notifications.Webhook public string SceneName { get; set; } public string IndexerFlags { get; set; } public long Size { get; set; } + public DateTime DateAdded { get; set; } } }