Added field sortNumber to chapter
This commit is contained in:
parent
0afbfb6010
commit
e0784b2c38
@ -13,6 +13,7 @@ public struct Chapter
|
|||||||
public string? chapterNumber { get; }
|
public string? chapterNumber { get; }
|
||||||
public string url { get; }
|
public string url { get; }
|
||||||
public string fileName { get; }
|
public string fileName { get; }
|
||||||
|
public string sortNumber { get; }
|
||||||
|
|
||||||
public Chapter(string? name, string? volumeNumber, string? chapterNumber, string url)
|
public Chapter(string? name, string? volumeNumber, string? chapterNumber, string url)
|
||||||
{
|
{
|
||||||
@ -25,7 +26,8 @@ public struct Chapter
|
|||||||
{
|
{
|
||||||
NumberDecimalSeparator = "."
|
NumberDecimalSeparator = "."
|
||||||
};
|
};
|
||||||
decimal orderNumber = Convert.ToDecimal(volumeNumber) * Convert.ToDecimal(chapterNumber, nfi);
|
sortNumber = decimal.Round(Convert.ToDecimal(volumeNumber) * Convert.ToDecimal(chapterNumber, nfi), 1)
|
||||||
this.fileName = $"{chapterName} - V{volumeNumber}C{chapterNumber} - {decimal.Round(orderNumber, 1).ToString(nfi)}";
|
.ToString(nfi);
|
||||||
|
this.fileName = $"{chapterName} - V{volumeNumber}C{chapterNumber} - {sortNumber}";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -75,7 +75,7 @@ public abstract class Connector
|
|||||||
new XElement("LanguageISO", publication.originalLanguage),
|
new XElement("LanguageISO", publication.originalLanguage),
|
||||||
new XElement("Title", chapter.name),
|
new XElement("Title", chapter.name),
|
||||||
new XElement("Volume", chapter.volumeNumber),
|
new XElement("Volume", chapter.volumeNumber),
|
||||||
new XElement("Number", chapter.chapterNumber)
|
new XElement("Number", chapter.sortNumber)
|
||||||
);
|
);
|
||||||
return comicInfo.ToString();
|
return comicInfo.ToString();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user