#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.chapterNumber = chapterNumber;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
|
||||||
List<string> chapterNameStrings = new();
|
string chapterVolNumStr;
|
||||||
|
if (volumeNumber is not null && volumeNumber.Length > 0)
|
||||||
|
chapterVolNumStr = $"Vol.{volumeNumber} Ch.{chapterNumber}";
|
||||||
|
else
|
||||||
|
chapterVolNumStr = $"Ch.{chapterNumber}";
|
||||||
|
|
||||||
if(volumeNumber is not null && volumeNumber.Length > 0)
|
if (name is not null && name.Length > 0)
|
||||||
chapterNameStrings.Add($"Vol.{volumeNumber}");
|
{
|
||||||
chapterNameStrings.Add($"Ch.{chapterNumber}");
|
string chapterName = IllegalStrings.Replace(string.Concat(LegalCharacters.Matches(name)), "");
|
||||||
if(name is not null && name.Length > 0) //chapterName
|
this.fileName = $"{chapterVolNumStr} - {chapterName}";
|
||||||
chapterNameStrings.Add(IllegalStrings.Replace(string.Concat(LegalCharacters.Matches(name)), ""));
|
}
|
||||||
this.fileName = string.Join(' ', chapterNameStrings);
|
else
|
||||||
|
this.fileName = chapterVolNumStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
Loading…
Reference in New Issue
Block a user