Another round of bugfixes (#3707)

This commit is contained in:
Joe Milazzo 2025-04-06 13:14:04 -05:00 committed by GitHub
parent cbb97208b8
commit 93dc6534fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 412 additions and 335 deletions

View file

@ -871,7 +871,10 @@ public class ParseScannedFiles
var prevIssue = string.Empty;
foreach (var chapter in chapters)
{
if (float.TryParse(chapter.Chapters, NumberStyles.Any, CultureInfo.InvariantCulture, out var parsedChapter))
// Use MinNumber in case there is a range, as otherwise sort order will cause it to be processed last
var chapterNum =
$"{Parser.Parser.MinNumberFromRange(chapter.Chapters).ToString(CultureInfo.InvariantCulture)}";
if (float.TryParse(chapterNum, NumberStyles.Any, CultureInfo.InvariantCulture, out var parsedChapter))
{
// Parsed successfully, use the numeric value
counter = parsedChapter;