Implemented fallback functionality. Try to use System.IO.Compression.ZipArchive then fallback to SharpCompress (which is extremely slow).

Currently this hits disk 3 times per operation, needs performance tuning.
This commit is contained in:
Joseph Milazzo 2021-03-23 14:12:28 -05:00
parent 067b5174ab
commit 154b30c3fd
4 changed files with 154 additions and 38 deletions

View file

@ -36,7 +36,6 @@ namespace API.Services
var firstFile = chapter.Files.OrderBy(x => x.Chapter).FirstOrDefault();
if (firstFile != null) chapter.CoverImage = _archiveService.GetCoverImage(firstFile.FilePath, true);
}
// NOTE: Can I put page calculation here? chapter.Pages = chapter.Files.Sum(f => f.Pages);
}