Random Fixes (#3549)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2025-02-15 17:25:18 -06:00 committed by GitHub
parent ea81a2f432
commit 39726f8c4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 425 additions and 107 deletions

View file

@ -173,7 +173,22 @@ public class CacheService : ICacheService
await extractLock.WaitAsync();
try {
if(_directoryService.Exists(extractPath)) return chapter;
if (_directoryService.Exists(extractPath))
{
if (extractPdfToImages)
{
var pdfImages = _directoryService.GetFiles(extractPath,
Tasks.Scanner.Parser.Parser.ImageFileExtensions);
if (pdfImages.Any())
{
return chapter;
}
}
else
{
return chapter;
}
}
var files = chapter?.Files.ToList();
ExtractChapterFiles(extractPath, files, extractPdfToImages);