mirror of
https://github.com/Readarr/Readarr
synced 2026-02-24 07:36:01 +01:00
Fixed: Don't mark downloads as failed if no files found
This commit is contained in:
parent
9249f0ca5d
commit
8dd6049603
2 changed files with 12 additions and 2 deletions
|
|
@ -148,6 +148,18 @@ public void should_not_mark_as_imported_if_no_tracks_were_parsed()
|
|||
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 @@ public void Import(TrackedDownload trackedDownload)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue