Fix #307 Chapternumbers

ChapterNumbers now can be sub-decimal, like version-numbers (x.y.z.a...)
This commit is contained in:
2025-01-09 01:33:30 +01:00
parent 55c0e2c4e7
commit 7cf7eb85d2
13 changed files with 379 additions and 39 deletions

View File

@ -152,7 +152,9 @@ public class AsuraToon : MangaConnector
string chapterUrl = chapterInfo.GetAttributeValue("href", "");
Match match = infoRex.Match(chapterInfo.InnerText);
float chapterNumber = float.Parse(match.Groups[1].Value);
if(!ChapterNumber.CanParse(match.Groups[1].Value))
continue;
ChapterNumber chapterNumber = new(match.Groups[1].Value);
string? chapterName = match.Groups[2].Success && match.Groups[2].Length > 1 ? match.Groups[2].Value : null;
string url = $"https://asuracomic.net/series/{chapterUrl}";
try