mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-06 00:36:58 +00:00
Fixed: Don't mark downloads as failed if no files found
This commit is contained in:
@@ -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<IDownloadedBooksImportService>()
|
||||
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Author>(), It.IsAny<DownloadClientItem>()))
|
||||
.Returns(new List<ImportResult>());
|
||||
|
||||
Subject.Import(_trackedDownload);
|
||||
|
||||
_trackedDownload.State.Should().Be(TrackedDownloadState.ImportPending);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_mark_as_imported_if_all_files_were_skipped()
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user