New: Add import date to upgraded episodes in CustomScript and Webhook connections

Closes #3615
This commit is contained in:
Mark McDowall 2022-08-15 13:31:28 -07:00
parent 4b5c8a815f
commit 549cdbe15a
2 changed files with 5 additions and 1 deletions

View File

@ -109,6 +109,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
{ {
environmentVariables.Add("Sonarr_DeletedRelativePaths", string.Join("|", message.OldFiles.Select(e => e.RelativePath))); 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)))); environmentVariables.Add("Sonarr_DeletedPaths", string.Join("|", message.OldFiles.Select(e => Path.Combine(series.Path, e.RelativePath))));
environmentVariables.Add("Sonarr_DeletedDateAdded", string.Join("|", message.OldFiles.Select(e => e.DateAdded)));
} }
ExecuteScript(environmentVariables); ExecuteScript(environmentVariables);

View File

@ -1,4 +1,5 @@
using NzbDrone.Core.MediaFiles; using System;
using NzbDrone.Core.MediaFiles;
namespace NzbDrone.Core.Notifications.Webhook namespace NzbDrone.Core.Notifications.Webhook
{ {
@ -18,6 +19,7 @@ namespace NzbDrone.Core.Notifications.Webhook
ReleaseGroup = episodeFile.ReleaseGroup; ReleaseGroup = episodeFile.ReleaseGroup;
SceneName = episodeFile.SceneName; SceneName = episodeFile.SceneName;
Size = episodeFile.Size; Size = episodeFile.Size;
DateAdded = episodeFile.DateAdded;
} }
public int Id { get; set; } public int Id { get; set; }
@ -28,5 +30,6 @@ namespace NzbDrone.Core.Notifications.Webhook
public string ReleaseGroup { get; set; } public string ReleaseGroup { get; set; }
public string SceneName { get; set; } public string SceneName { get; set; }
public long Size { get; set; } public long Size { get; set; }
public DateTime DateAdded { get; set; }
} }
} }