Fixes #98 VolumeNumber can not be null for comparison
This commit is contained in:
parent
05573f65f9
commit
e11ee4dafe
@ -12,7 +12,7 @@ public readonly struct Chapter : IComparable
|
|||||||
// ReSharper disable once MemberCanBePrivate.Global
|
// ReSharper disable once MemberCanBePrivate.Global
|
||||||
public Manga parentManga { get; }
|
public Manga parentManga { get; }
|
||||||
public string? name { get; }
|
public string? name { get; }
|
||||||
public string? volumeNumber { get; }
|
public string volumeNumber { get; }
|
||||||
public string chapterNumber { get; }
|
public string chapterNumber { get; }
|
||||||
public string url { get; }
|
public string url { get; }
|
||||||
// ReSharper disable once MemberCanBePrivate.Global
|
// ReSharper disable once MemberCanBePrivate.Global
|
||||||
@ -24,12 +24,12 @@ public readonly struct Chapter : IComparable
|
|||||||
{
|
{
|
||||||
this.parentManga = parentManga;
|
this.parentManga = parentManga;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.volumeNumber = volumeNumber;
|
this.volumeNumber = volumeNumber ?? "0";
|
||||||
this.chapterNumber = chapterNumber;
|
this.chapterNumber = chapterNumber;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
|
||||||
string chapterName = string.Concat(LegalCharacters.Matches(name ?? ""));
|
string chapterName = string.Concat(LegalCharacters.Matches(name ?? ""));
|
||||||
string volStr = this.volumeNumber is not null ? $"Vol.{this.volumeNumber} " : "";
|
string volStr = volumeNumber is not null ? $"Vol.{volumeNumber} " : "";
|
||||||
string chNumberStr = $"Ch.{chapterNumber} ";
|
string chNumberStr = $"Ch.{chapterNumber} ";
|
||||||
string chNameStr = chapterName.Length > 0 ? $"- {chapterName}" : "";
|
string chNameStr = chapterName.Length > 0 ? $"- {chapterName}" : "";
|
||||||
chNameStr = IllegalStrings.Replace(chNameStr, "");
|
chNameStr = IllegalStrings.Replace(chNameStr, "");
|
||||||
|
Loading…
Reference in New Issue
Block a user