mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Cleaned up some TODOs.
This commit is contained in:
parent
c75feb03e1
commit
44ebca36ec
@ -66,7 +66,7 @@ namespace API.Controllers
|
||||
|
||||
user.Progresses.Add(new AppUserProgress
|
||||
{
|
||||
PagesRead = bookmarkDto.PageNum, // TODO: PagesRead is misleading. Should it be PageNumber or PagesRead (+1)?
|
||||
PagesRead = bookmarkDto.PageNum,
|
||||
VolumeId = bookmarkDto.VolumeId,
|
||||
SeriesId = bookmarkDto.SeriesId,
|
||||
});
|
||||
|
@ -110,10 +110,9 @@ namespace API.Services
|
||||
{
|
||||
var path = GetVolumeCachePath(volume.Id, mangaFile);
|
||||
var files = DirectoryService.GetFiles(path);
|
||||
var array = files.ToArray();
|
||||
Array.Sort(array, _numericComparer); // TODO: Find a way to apply numericComparer to IList.
|
||||
Array.Sort(files, _numericComparer);
|
||||
|
||||
return array.ElementAt(page - pagesSoFar);
|
||||
return files.ElementAt(page - pagesSoFar);
|
||||
}
|
||||
|
||||
pagesSoFar += mangaFile.NumberOfPages;
|
||||
|
@ -51,9 +51,9 @@ namespace API.Services
|
||||
reSearchPattern.IsMatch(Path.GetExtension(file)));
|
||||
}
|
||||
|
||||
public static IList<string> GetFiles(string path)
|
||||
public static string[] GetFiles(string path)
|
||||
{
|
||||
if (!Directory.Exists(path)) return ImmutableList<string>.Empty;
|
||||
if (!Directory.Exists(path)) return Array.Empty<string>();
|
||||
return Directory.GetFiles(path);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user