Scanner Fixes (#3619)

Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
Joe Milazzo 2025-03-12 17:25:15 -05:00 committed by GitHub
parent b4061e3711
commit ab540c0ea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 340 additions and 19 deletions

View file

@ -865,8 +865,11 @@ public class ProcessSeries : IProcessSeries
var fileInfo = _directoryService.FileSystem.FileInfo.New(info.FullFilePath);
if (existingFile != null)
{
// TODO: I wonder if we can simplify this force check.
existingFile.Format = info.Format;
if (!forceUpdate && !_fileService.HasFileBeenModifiedSince(existingFile.FilePath, existingFile.LastModified) && existingFile.Pages != 0) return;
existingFile.Pages = _readingItemService.GetNumberOfPages(info.FullFilePath, info.Format);
existingFile.Extension = fileInfo.Extension.ToLowerInvariant();
existingFile.FileName = Parser.Parser.RemoveExtensionIfSupported(existingFile.FilePath);