Cleanup after feature implementation.

This commit is contained in:
Joseph Milazzo 2021-02-04 17:01:37 -06:00
parent 1050fa4e54
commit 10c8ea34fe
19 changed files with 23 additions and 80 deletions

View file

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
@ -110,8 +109,7 @@ namespace API.Services
if (page < (mangaFile.NumberOfPages + pagesSoFar))
{
var path = GetCachePath(chapter.Id);
// TODO: GetFiles should only get image files.
var files = _directoryService.GetFiles(path);
var files = _directoryService.GetFiles(path, Parser.Parser.ImageFileExtensions);
Array.Sort(files, _numericComparer);
return (files.ElementAt(page - pagesSoFar), mangaFile);