diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs index 09ee280ed..416311940 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs @@ -54,6 +54,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport _fail3.Setup(c => c.IsSatisfiedBy(It.IsAny(), It.IsAny())).Returns(Decision.Reject("_fail3")); _series = Builder.CreateNew() + .With(e => e.Path = @"C:\Test\Series".AsOsAgnostic()) .With(e => e.Profile = new Profile { Items = Qualities.QualityFixture.GetDefaultQualities() }) .Build(); @@ -101,7 +102,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport GivenAugmentationSuccess(); GivenSpecifications(_pass1, _pass2, _pass3, _fail1, _fail2, _fail3); - Subject.GetImportDecisions(_videoFiles, new Series(), downloadClientItem, null, false); + Subject.GetImportDecisions(_videoFiles, _series, downloadClientItem, null, false); _fail1.Verify(c => c.IsSatisfiedBy(It.IsAny(), downloadClientItem), Times.Once()); _fail2.Verify(c => c.IsSatisfiedBy(It.IsAny(), downloadClientItem), Times.Once()); @@ -116,7 +117,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport { GivenSpecifications(_fail1); - var result = Subject.GetImportDecisions(_videoFiles, new Series()); + var result = Subject.GetImportDecisions(_videoFiles, _series); result.Single().Approved.Should().BeFalse(); } @@ -126,7 +127,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport { GivenSpecifications(_pass1, _fail1, _pass2, _pass3); - var result = Subject.GetImportDecisions(_videoFiles, new Series()); + var result = Subject.GetImportDecisions(_videoFiles, _series); result.Single().Approved.Should().BeFalse(); } @@ -137,7 +138,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport GivenAugmentationSuccess(); GivenSpecifications(_pass1, _pass2, _pass3); - var result = Subject.GetImportDecisions(_videoFiles, new Series()); + var result = Subject.GetImportDecisions(_videoFiles, _series); result.Single().Approved.Should().BeTrue(); } @@ -148,7 +149,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport GivenAugmentationSuccess(); GivenSpecifications(_pass1, _pass2, _pass3, _fail1, _fail2, _fail3); - var result = Subject.GetImportDecisions(_videoFiles, new Series()); + var result = Subject.GetImportDecisions(_videoFiles, _series); result.Single().Rejections.Should().HaveCount(3); } diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs index 7d066bf31..2b3291006 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs @@ -73,7 +73,8 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport DownloadClientEpisodeInfo = downloadClientItemInfo, FolderEpisodeInfo = folderInfo, Path = file, - SceneSource = sceneSource + SceneSource = sceneSource, + ExistingFile = series.Path.IsParentPath(file) }; decisions.AddIfNotNull(GetDecision(localEpisode, downloadClientItem, nonSampleVideoFileCount > 1));