From 03a042a5ec4ab65cd6144fef934e958a847b7220 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 Sep 2025 18:29:54 +0200 Subject: [PATCH] fix Chapter 0 not having a chapter number --- API/Schema/MangaContext/Chapter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API/Schema/MangaContext/Chapter.cs b/API/Schema/MangaContext/Chapter.cs index cc0ef6c..98c201c 100644 --- a/API/Schema/MangaContext/Chapter.cs +++ b/API/Schema/MangaContext/Chapter.cs @@ -34,7 +34,7 @@ public class Chapter : Identifiable, IComparable { if(ChapterNumberRegex.Match(chapterNumber) is not { Success: true } match || !match.Value.Equals(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.ParentManga = parentManga; this.MangaConnectorIds = [];