Fixed: Don't mark downloads as failed if no files found

Resolves #945
pull/1689/head
ta264 5 years ago committed by Qstick
parent 6cfb54030b
commit c4cf178144

@ -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<IDownloadedTracksImportService>()
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Artist>(), It.IsAny<DownloadClientItem>()))
.Returns(new List<ImportResult>());
Subject.Process(_trackedDownload);
AssertNoCompletedDownload();
_trackedDownload.State.Should().NotBe(TrackedDownloadStage.ImportFailed);
}
[Test]
public void should_not_mark_as_imported_if_all_files_were_skipped()
{

@ -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;
}

Loading…
Cancel
Save