Catch parsing error #93 to prevent crashes and restart loops
This commit is contained in:
parent
23e5c4a7b1
commit
29f6de2590
@ -64,9 +64,19 @@ public abstract class MangaConnector : GlobalBase
|
||||
&& chapterNumber > manga.ignoreChaptersBelow
|
||||
&& !nChapter.CheckChapterIsDownloaded(settings.downloadLocation)).ToList();
|
||||
Log($"{newChaptersList.Count} new chapters. {manga}");
|
||||
try
|
||||
{
|
||||
Chapter latestChapterAvailable =
|
||||
allChapters.MaxBy(chapter => Convert.ToSingle(chapter.chapterNumber, numberFormatDecimalPoint));
|
||||
manga.latestChapterAvailable = Convert.ToSingle(latestChapterAvailable.chapterNumber, numberFormatDecimalPoint);
|
||||
manga.latestChapterAvailable =
|
||||
Convert.ToSingle(latestChapterAvailable.chapterNumber, numberFormatDecimalPoint);
|
||||
}
|
||||
catch (FormatException f)
|
||||
{
|
||||
Log(f.ToString());
|
||||
Log($"Failed getting new Chapters for {manga}");
|
||||
return Array.Empty<Chapter>();
|
||||
}
|
||||
|
||||
return newChaptersList.ToArray();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user