Scanner & Parser Changes (#735)
* Fixed a bug where partial volume support got missed on the epub parser. * When a drive is unavailable during when a scan starts, abort so user doesn't loose half library if their networked drive goes down. * Moved format for card details to highest level (since all chapters/files have same format) and added date added to each file to help when new chapters/files are added and grouped into a volume. * Implemented handling on the UI when a series is deleted * Added case for series removal for series detail * Only redirect for this series
This commit is contained in:
parent
0bc63dda32
commit
78f3ccf889
11 changed files with 85 additions and 17 deletions
|
|
@ -56,6 +56,14 @@ namespace API.Services.Tasks
|
|||
var chapterIds = await _unitOfWork.SeriesRepository.GetChapterIdsForSeriesAsync(new[] {seriesId});
|
||||
var library = await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(libraryId, LibraryIncludes.Folders);
|
||||
var folderPaths = library.Folders.Select(f => f.Path).ToList();
|
||||
|
||||
// Check if any of the folder roots are not available (ie disconnected from network, etc) and fail if any of them are
|
||||
if (folderPaths.Any(f => !DirectoryService.IsDriveMounted(f)))
|
||||
{
|
||||
_logger.LogError("Some of the root folders for library are not accessible. Please check that drives are connected and rescan. Scan will be aborted");
|
||||
return;
|
||||
}
|
||||
|
||||
var dirs = DirectoryService.FindHighestDirectoriesFromFiles(folderPaths, files.Select(f => f.FilePath).ToList());
|
||||
|
||||
_logger.LogInformation("Beginning file scan on {SeriesName}", series.Name);
|
||||
|
|
@ -195,6 +203,14 @@ namespace API.Services.Tasks
|
|||
return;
|
||||
}
|
||||
|
||||
// Check if any of the folder roots are not available (ie disconnected from network, etc) and fail if any of them are
|
||||
if (library.Folders.Any(f => !DirectoryService.IsDriveMounted(f.Path)))
|
||||
{
|
||||
_logger.LogError("Some of the root folders for library are not accessible. Please check that drives are connected and rescan. Scan will be aborted");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
_logger.LogInformation("[ScannerService] Beginning file scan on {LibraryName}", library.Name);
|
||||
await _messageHub.Clients.All.SendAsync(SignalREvents.ScanLibraryProgress,
|
||||
MessageFactory.ScanLibraryProgressEvent(libraryId, 0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue