#113 old formatting of fileNames
This commit is contained in:
parent
2eaeadb92c
commit
5bc414fd59
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user