1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

New: Add recycle bin path for deleted episodes to webhook/custom script

Closes #6114
This commit is contained in:
Mark McDowall
2024-01-20 19:22:07 -08:00
committed by Mark McDowall
parent 9ba5850fca
commit a71d40edba
17 changed files with 60 additions and 34 deletions
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.MediaFiles;
@@ -33,16 +33,16 @@ namespace NzbDrone.Core.Test.NotificationTests
RelativePath = "file1.S01E01E02.mkv"
},
OldFiles = new List<EpisodeFile>
OldFiles = new List<DeletedEpisodeFile>
{
new EpisodeFile
new DeletedEpisodeFile(new EpisodeFile
{
RelativePath = "file1.S01E01.mkv"
},
new EpisodeFile
}, null),
new DeletedEpisodeFile(new EpisodeFile
{
RelativePath = "file1.S01E02.mkv"
}
}, null)
}
};
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using Moq;
@@ -28,7 +28,7 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc
_downloadMessage = Builder<DownloadMessage>.CreateNew()
.With(d => d.Series = series)
.With(d => d.EpisodeFile = episodeFile)
.With(d => d.OldFiles = new List<EpisodeFile>())
.With(d => d.OldFiles = new List<DeletedEpisodeFile>())
.Build();
Subject.Definition = new NotificationDefinition();
@@ -40,9 +40,12 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc
private void GivenOldFiles()
{
_downloadMessage.OldFiles = Builder<EpisodeFile>.CreateListOfSize(1)
.Build()
.ToList();
_downloadMessage.OldFiles = Builder<DeletedEpisodeFile>
.CreateListOfSize(1)
.All()
.WithFactory(() => new DeletedEpisodeFile(Builder<EpisodeFile>.CreateNew().Build(), null))
.Build()
.ToList();
Subject.Definition.Settings = new XbmcSettings
{