fixed chapter order
This commit is contained in:
parent
340a2b7e43
commit
2925206048
@ -1,4 +1,5 @@
|
|||||||
using System.Text.Json;
|
using System.Globalization;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
|
||||||
namespace Tranga.Connectors;
|
namespace Tranga.Connectors;
|
||||||
@ -151,7 +152,12 @@ public class MangaDex : Connector
|
|||||||
chapters.Add(new Chapter(publication, title, volume, chapterNum, chapterId));
|
chapters.Add(new Chapter(publication, title, volume, chapterNum, chapterId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chapters.OrderBy(chapter => chapter.chapterNumber).ToArray();
|
|
||||||
|
NumberFormatInfo chapterNumberFormatInfo = new NumberFormatInfo()
|
||||||
|
{
|
||||||
|
NumberDecimalSeparator = "."
|
||||||
|
};
|
||||||
|
return chapters.OrderBy(chapter => Convert.ToSingle(chapter.chapterNumber, chapterNumberFormatInfo)).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DownloadChapter(Publication publication, Chapter chapter)
|
public override void DownloadChapter(Publication publication, Chapter chapter)
|
||||||
|
Loading…
Reference in New Issue
Block a user