2
0

#113 old formatting of fileNames

This commit is contained in:
Glax 2024-02-07 15:34:20 +01:00
parent 2eaeadb92c
commit 5bc414fd59

View File

@ -28,14 +28,19 @@ public readonly struct Chapter : IComparable
this.chapterNumber = chapterNumber;
this.url = url;
List<string> chapterNameStrings = new();
string chapterVolNumStr;
if (volumeNumber is not null && volumeNumber.Length > 0)
chapterNameStrings.Add($"Vol.{volumeNumber}");
chapterNameStrings.Add($"Ch.{chapterNumber}");
if(name is not null && name.Length > 0) //chapterName
chapterNameStrings.Add(IllegalStrings.Replace(string.Concat(LegalCharacters.Matches(name)), ""));
this.fileName = string.Join(' ', chapterNameStrings);
chapterVolNumStr = $"Vol.{volumeNumber} Ch.{chapterNumber}";
else
chapterVolNumStr = $"Ch.{chapterNumber}";
if (name is not null && name.Length > 0)
{
string chapterName = IllegalStrings.Replace(string.Concat(LegalCharacters.Matches(name)), "");
this.fileName = $"{chapterVolNumStr} - {chapterName}";
}
else
this.fileName = chapterVolNumStr;
}
public override string ToString()