Some code cleanup
This commit is contained in:
parent
585e965a85
commit
d73bd22db2
34 changed files with 814 additions and 383 deletions
|
|
@ -106,7 +106,7 @@ namespace API.Services
|
|||
var chapterFiles = chapter.Files ?? await _unitOfWork.VolumeRepository.GetFilesForChapter(chapter.Id);
|
||||
foreach (var mangaFile in chapterFiles)
|
||||
{
|
||||
if (page <= (mangaFile.NumberOfPages + pagesSoFar))
|
||||
if (page <= (mangaFile.Pages + pagesSoFar))
|
||||
{
|
||||
var path = GetCachePath(chapter.Id);
|
||||
var files = _directoryService.GetFilesWithExtension(path, Parser.Parser.ImageFileExtensions);
|
||||
|
|
@ -121,7 +121,7 @@ namespace API.Services
|
|||
return (files.ElementAt(page - pagesSoFar), mangaFile);
|
||||
}
|
||||
|
||||
pagesSoFar += mangaFile.NumberOfPages;
|
||||
pagesSoFar += mangaFile.Pages;
|
||||
}
|
||||
|
||||
return ("", null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue