More Scan Loop Fixes (#1473)

* Added a ToList() to avoid a bug where a person could be removed from a list while iterating over the list.

* When deleting a series, want to read page will now automatically remove that series from the view.

* Fixed a series lookup which was ignoring format

* Ignore XML comment warnings

* Removed a note since it was already working that way

* Fixed unit test
This commit is contained in:
Joseph Milazzo 2022-08-24 19:02:16 -05:00 committed by GitHub
parent e37d7cfbba
commit f92ef19b61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 19 deletions

View file

@ -436,7 +436,7 @@ public class ScannerService : IScannerService
var shouldUseLibraryScan = !(await _unitOfWork.LibraryRepository.DoAnySeriesFoldersMatch(libraryFolderPaths));
if (!shouldUseLibraryScan)
{
_logger.LogInformation("Library {LibraryName} consists of one ore more Series folders, using series scan", library.Name);
_logger.LogError("Library {LibraryName} consists of one or more Series folders, using series scan", library.Name);
}
@ -459,8 +459,6 @@ public class ScannerService : IScannerService
Format = parsedFiles.First().Format
};
// NOTE: Could we check if there are multiple found series (different series) and process each one?
if (skippedScan)
{
seenSeries.AddRange(parsedFiles.Select(pf => new ParsedSeries()
@ -485,7 +483,6 @@ public class ScannerService : IScannerService
await Task.WhenAll(processTasks);
//await _eventHub.SendMessageAsync(MessageFactory.NotificationProgress, MessageFactory.LibraryScanProgressEvent(library.Name, ProgressEventType.Ended, string.Empty));
await _eventHub.SendMessageAsync(MessageFactory.NotificationProgress, MessageFactory.FileScanProgressEvent(string.Empty, library.Name, ProgressEventType.Ended));
_logger.LogInformation("[ScannerService] Finished file scan in {ScanAndUpdateTime}. Updating database", scanElapsedTime);