[cuttingedge] fix(Weebcentral): File name also depends on original chapter name

This commit is contained in:
Alessandro Benetton
2025-03-01 11:39:12 +01:00
parent 9cef068785
commit 71f663ca2f
2 changed files with 47 additions and 45 deletions

View File

@@ -44,7 +44,7 @@ public readonly struct Chapter : IComparable
if (name is not null && name.Length > 0)
{
string chapterName = IllegalStrings.Replace(string.Concat(LegalCharacters.Matches(name)), "");
this.fileName = $"{chapterVolNumStr} - {chapterName}";
this.fileName = chapterName.Length > 0 ? $"{chapterVolNumStr} - {chapterName}" : chapterVolNumStr;
}
else
this.fileName = chapterVolNumStr;