From 55a311d207ef83ea594e0bb6146cf3a46999b57d Mon Sep 17 00:00:00 2001 From: masterhc Date: Thu, 18 Apr 2024 20:06:47 +0100 Subject: [PATCH] Manga returns the Image List chapter list ordered. --- lib.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib.js b/lib.js index 11c109b..8f07d8e 100644 --- a/lib.js +++ b/lib.js @@ -300,7 +300,11 @@ module.exports.Manga = class Manga try { const Scanlator = new this.Engine(); const Manga = await Scanlator.GetManga(this.link, this.title); - const List = await Scanlator.ChapterList(this.link, this.title); + let List = await Scanlator.ChapterList(this.link, this.title); + List = List.sort((a,b)=> + { + return a.num-b.num; + }) const Status = Manga.Status?Manga.Status:Manga.status; //TODO: Defaults for missing info from the modules; return {...Manga, Status, link:this.link, scanlator:this.scanlator, List, title:this.title}