Fixed offset bug in GetCachedPagePath for if you've read just one page. Fixed a bad refactor for getting files.

This commit is contained in:
Joseph Milazzo 2021-01-19 12:06:45 -06:00
parent 14e8c3b820
commit c75feb03e1
5 changed files with 26 additions and 19 deletions

View file

@ -113,7 +113,7 @@ namespace API.Services
var array = files.ToArray();
Array.Sort(array, _numericComparer); // TODO: Find a way to apply numericComparer to IList.
return array.ElementAt((page + 1) - pagesSoFar);
return array.ElementAt(page - pagesSoFar);
}
pagesSoFar += mangaFile.NumberOfPages;