diff --git a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs index e6b03c089..52201b5e5 100644 --- a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs +++ b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs @@ -148,6 +148,18 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests AssertNotImported(); } + [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.Import(_trackedDownload); + + _trackedDownload.State.Should().Be(TrackedDownloadState.ImportPending); + } + [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 6707b5686..bc6234b73 100644 --- a/src/NzbDrone.Core/Download/CompletedDownloadService.cs +++ b/src/NzbDrone.Core/Download/CompletedDownloadService.cs @@ -94,9 +94,7 @@ namespace NzbDrone.Core.Download if (importResults.Empty()) { - trackedDownload.State = TrackedDownloadState.ImportFailed; trackedDownload.Warn("No files found are eligible for import in {0}", outputPath); - _eventAggregator.PublishEvent(new BookImportIncompleteEvent(trackedDownload)); return; }