diff --git a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceFixture.cs b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceFixture.cs index 433f38b20..c4374e1bd 100644 --- a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceFixture.cs @@ -283,6 +283,19 @@ namespace NzbDrone.Core.Test.Download AssertImportIncomplete(); } + [Test] + public void should_not_mark_as_failed_if_nothing_found_to_import() + { + Mocker.GetMock() + .Setup(v => v.ProcessPath(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(new List()); + + Subject.Process(_trackedDownload); + + AssertNoCompletedDownload(); + _trackedDownload.State.Should().NotBe(TrackedDownloadStage.ImportFailed); + } + [Test] public void should_not_mark_as_imported_if_all_files_were_skipped() { diff --git a/src/NzbDrone.Core/Download/CompletedDownloadService.cs b/src/NzbDrone.Core/Download/CompletedDownloadService.cs index 9195fc942..ba4cddab2 100644 --- a/src/NzbDrone.Core/Download/CompletedDownloadService.cs +++ b/src/NzbDrone.Core/Download/CompletedDownloadService.cs @@ -108,9 +108,7 @@ namespace NzbDrone.Core.Download if (importResults.Empty()) { - trackedDownload.State = TrackedDownloadStage.ImportFailed; trackedDownload.Warn("No files found are eligible for import in {0}", outputPath); - _eventAggregator.PublishEvent(new AlbumImportIncompleteEvent(trackedDownload)); return; }