Missing Migration (#2790)

This commit is contained in:
Joe Milazzo 2024-03-17 17:21:28 -05:00 committed by GitHub
parent 2b6fd1224f
commit f443e513d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 387 additions and 29 deletions

View file

@ -166,13 +166,17 @@ public class ParseScannedFiles
}
normalizedPath = Parser.Parser.NormalizePath(folderPath);
var libraryRoot =
library.Folders.FirstOrDefault(f =>
Parser.Parser.NormalizePath(folderPath).Contains(Parser.Parser.NormalizePath(f.Path)))?.Path ??
folderPath;
if (HasSeriesFolderNotChangedSinceLastScan(seriesPaths, normalizedPath, forceCheck))
{
result.Add(new ScanResult()
{
Files = ArraySegment<string>.Empty,
Folder = folderPath,
LibraryRoot = folderPath,
LibraryRoot = libraryRoot,
HasChanged = false
});
}
@ -181,7 +185,7 @@ public class ParseScannedFiles
{
Files = _directoryService.ScanFiles(folderPath, fileExtensions),
Folder = folderPath,
LibraryRoot = folderPath,
LibraryRoot = libraryRoot,
HasChanged = true
});

View file

@ -724,6 +724,7 @@ public class ProcessSeries : IProcessSeries
existingFile.Pages = _readingItemService.GetNumberOfPages(info.FullFilePath, info.Format);
existingFile.Extension = fileInfo.Extension.ToLowerInvariant();
existingFile.FileName = Parser.Parser.RemoveExtensionIfSupported(existingFile.FilePath);
existingFile.FilePath = Parser.Parser.NormalizePath(existingFile.FilePath);
existingFile.Bytes = fileInfo.Length;
// We skip updating DB here with last modified time so that metadata refresh can do it
}