Scrobbling Polish and Some Scanner fixes (#3638)
Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
parent
82e8f7fade
commit
f281a63934
19 changed files with 658 additions and 102 deletions
|
@ -166,8 +166,10 @@ public class ParseScannedFiles
|
|||
// Don't process any folders where we've already scanned everything below
|
||||
if (processedDirs.Any(d => d.StartsWith(directory + Path.AltDirectorySeparatorChar) || d.Equals(directory)))
|
||||
{
|
||||
var hasChanged = !HasSeriesFolderNotChangedSinceLastScan(library, seriesPaths, directory, forceCheck);
|
||||
// Skip this directory as we've already processed a parent unless there are loose files at that directory
|
||||
CheckSurfaceFiles(result, directory, folderPath, fileExtensions, matcher);
|
||||
// and they have changes
|
||||
CheckSurfaceFiles(result, directory, folderPath, fileExtensions, matcher, hasChanged);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -290,14 +292,14 @@ public class ParseScannedFiles
|
|||
/// <summary>
|
||||
/// Performs a full scan of the directory and adds it to the result.
|
||||
/// </summary>
|
||||
private void CheckSurfaceFiles(List<ScanResult> result, string directory, string folderPath, string fileExtensions, GlobMatcher matcher)
|
||||
private void CheckSurfaceFiles(List<ScanResult> result, string directory, string folderPath, string fileExtensions, GlobMatcher matcher, bool hasChanged)
|
||||
{
|
||||
var files = _directoryService.ScanFiles(directory, fileExtensions, matcher, SearchOption.TopDirectoryOnly);
|
||||
if (files.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
result.Add(CreateScanResult(directory, folderPath, true, files));
|
||||
result.Add(CreateScanResult(directory, folderPath, hasChanged, files));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue