Some smells found in scan.

This commit is contained in:
Joseph Milazzo 2021-03-23 15:04:22 -05:00
parent 44c2af88ea
commit a176034905
3 changed files with 2 additions and 15 deletions

View file

@ -80,7 +80,7 @@ namespace API.Services
{
_logger.LogDebug("Using SharpCompress compression handling");
using var archive = ArchiveFactory.Open(archivePath);
return archive.Entries.Where(entry => !entry.IsDirectory && Parser.Parser.IsImage(entry.Key)).Count();
return archive.Entries.Count(entry => !entry.IsDirectory && Parser.Parser.IsImage(entry.Key));
}
case ArchiveLibrary.NotSupported:
_logger.LogError("[GetNumberOfPagesFromArchive] This archive cannot be read: {ArchivePath}. Defaulting to 0 pages", archivePath);

View file

@ -62,7 +62,7 @@ namespace API.Services
public void UpdateMetadata(Series series, bool forceUpdate)
{
// TODO: this doesn't actually invoke finding a new cover. Also all these should be grouped ideally so we limit
// NOTE: this doesn't actually invoke finding a new cover. Also all these should be grouped ideally so we limit
// disk I/O to one method.
if (series == null) return;
if (ShouldFindCoverImage(series.CoverImage, forceUpdate))