mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
New: Only scan files that are new or updated (#760)
* New: Only scan files that are new or updated Pass through filter correctly Add more tests Add tests for migration 30 * Fix windows disk provider * Don't publish deleted event for unmapped file * Fix test on windows
This commit is contained in:
+5
-1
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using FluentAssertions;
|
||||
@@ -37,7 +38,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||
.Returns(1000000);
|
||||
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.FilterFiles(It.IsAny<string>(), It.IsAny<IEnumerable<string>>()))
|
||||
.Returns<string, IEnumerable<string>>((b, s) => s.ToList());
|
||||
.Returns<string, IEnumerable<string>>((b, s) => s.ToList());
|
||||
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.FilterFiles(It.IsAny<string>(), It.IsAny<IEnumerable<IFileInfo>>()))
|
||||
.Returns<string, IEnumerable<IFileInfo>>((b, s) => s.ToList());
|
||||
}
|
||||
|
||||
protected void GivenChangedItem()
|
||||
|
||||
+4
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using FluentAssertions;
|
||||
@@ -52,6 +53,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.FilterFiles(It.IsAny<string>(), It.IsAny<IEnumerable<string>>()))
|
||||
.Returns<string, IEnumerable<string>>((b, s) => s.ToList());
|
||||
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.FilterFiles(It.IsAny<string>(), It.IsAny<IEnumerable<IFileInfo>>()))
|
||||
.Returns<string, IEnumerable<IFileInfo>>((b, s) => s.ToList());
|
||||
}
|
||||
|
||||
protected void GivenFailedDownload()
|
||||
|
||||
+4
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using FluentAssertions;
|
||||
@@ -46,6 +47,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.FilterFiles(It.IsAny<string>(), It.IsAny<IEnumerable<string>>()))
|
||||
.Returns<string, IEnumerable<string>>((b, s) => s.ToList());
|
||||
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.FilterFiles(It.IsAny<string>(), It.IsAny<IEnumerable<IFileInfo>>()))
|
||||
.Returns<string, IEnumerable<IFileInfo>>((b, s) => s.ToList());
|
||||
}
|
||||
|
||||
protected void GivenFailedDownload()
|
||||
|
||||
Reference in New Issue
Block a user