mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-11 05:09:49 +02:00
fix Chapter 0 not having a chapter number
This commit is contained in:
@@ -34,7 +34,7 @@ public class Chapter : Identifiable, IComparable<Chapter>
|
|||||||
{
|
{
|
||||||
if(ChapterNumberRegex.Match(chapterNumber) is not { Success: true } match || !match.Value.Equals(chapterNumber))
|
if(ChapterNumberRegex.Match(chapterNumber) is not { Success: true } match || !match.Value.Equals(chapterNumber))
|
||||||
throw new ArgumentException($"Invalid chapter number: {chapterNumber}");
|
throw new ArgumentException($"Invalid chapter number: {chapterNumber}");
|
||||||
chapterNumber = string.Join('.', chapterNumber.Split('.').Select(p => p.TrimStart('0')));
|
chapterNumber = string.Join('.', chapterNumber.Split('.').Select(p => int.Parse(p).ToString()));
|
||||||
this.ChapterNumber = chapterNumber;
|
this.ChapterNumber = chapterNumber;
|
||||||
this.ParentManga = parentManga;
|
this.ParentManga = parentManga;
|
||||||
this.MangaConnectorIds = [];
|
this.MangaConnectorIds = [];
|
||||||
|
Reference in New Issue
Block a user