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

@ -184,8 +184,10 @@ public class MangaKatana : MangaConnector
string url = chapterInfo.Descendants("a").First()
.GetAttributeValue("href", "");
float? volumeNumber = volumeRex.IsMatch(url) ? float.Parse(volumeRex.Match(url).Groups[1].Value) : null;
float chapterNumber = float.Parse(chapterNumRex.Match(url).Groups[1].Value);
int? volumeNumber = volumeRex.IsMatch(url) ? int.Parse(volumeRex.Match(url).Groups[1].Value) : null;
if(!ChapterNumber.CanParse(chapterNumRex.Match(url).Groups[1].Value))
continue;
ChapterNumber chapterNumber = new(chapterNumRex.Match(url).Groups[1].Value);
string chapterName = chapterNameRex.Match(fullString).Groups[1].Value;
try
{