Performance Enhancements (#937)

This commit is contained in:
Robbie Davis 2022-01-14 15:42:32 -05:00 committed by GitHub
parent aeb6d8e983
commit 491d9600dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View file

@ -57,6 +57,9 @@ namespace API.Services
{
if (string.IsNullOrEmpty(archivePath) || !(File.Exists(archivePath) && Parser.Parser.IsArchive(archivePath) || Parser.Parser.IsEpub(archivePath))) return ArchiveLibrary.NotSupported;
var ext = _directoryService.FileSystem.Path.GetExtension(archivePath).ToUpper();
if (ext.Equals(".CBR") || ext.Equals(".RAR")) return ArchiveLibrary.SharpCompress;
try
{
using var a2 = ZipFile.OpenRead(archivePath);