Open C9Glax opened 1 year ago
Would it be possible to implement this feature by scanning the highest chapter number in the filename, rather than unzipping each file? Just an idea, not sure how it works. I think the current untested version would just return the latest downloaded chapter on disk which isn't necessarily the highest downloaded chapter.
latestChapterDownloaded = latestChapterDownloaded < chapterNumber ? chapterNumber : latestChapterDownloaded;
makes sure it's the newest.
The problem with parsing filenames after the fact, is that the regex could mess up, should there be numbers in the title. Unzipping and parsing from the ComicInfo.xml would give a 100% accurate result.
So if I understand correctly, this line of code is already in the API and should return the latestChapterDownloaded whenever a new chapter is downloaded, so Mangas added after the implementation should have this field be non-zero if they've had a chapter downloaded after then? Also it should work, in theory, when searching for a Manga? I ask because currently my version of the API (which isn't latest but does have these fields) is reporting all values as 0
https://github.com/C9Glax/tranga-website/pull/17#issuecomment-1782243644