From 3938c6129745b36ab8bd61a7e42b99d4a90eaabe Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 4 Oct 2023 17:45:13 +0200 Subject: [PATCH] #62 https://github.com/C9Glax/tranga/issues/62#issuecomment-1747064431 Parsing, parsing, parsing --- Tranga/MangaConnectors/MangaConnector.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tranga/MangaConnectors/MangaConnector.cs b/Tranga/MangaConnectors/MangaConnector.cs index 60be0a8..834c74f 100644 --- a/Tranga/MangaConnectors/MangaConnector.cs +++ b/Tranga/MangaConnectors/MangaConnector.cs @@ -58,9 +58,9 @@ public abstract class MangaConnector : GlobalBase Log($"Getting new Chapters for {manga}"); Chapter[] newChapters = this.GetChapters(manga, language); Log($"Checking for duplicates {manga}"); - List newChaptersList = newChapters.Where(nChapter => - float.Parse(nChapter.chapterNumber, numberFormatDecimalPoint) > manga.ignoreChaptersBelow && - !nChapter.CheckChapterIsDownloaded(settings.downloadLocation)).ToList(); + List newChaptersList = newChapters.Where(nChapter => float.TryParse(nChapter.chapterNumber, numberFormatDecimalPoint, out float chapterNumber) + && chapterNumber > manga.ignoreChaptersBelow + && !nChapter.CheckChapterIsDownloaded(settings.downloadLocation)).ToList(); Log($"{newChaptersList.Count} new chapters. {manga}"); return newChaptersList.ToArray();