From b7903023b628894ff7b9364ae646aafe1566104e Mon Sep 17 00:00:00 2001 From: Carlos Escobedo Date: Wed, 24 Jan 2018 20:03:22 -0500 Subject: [PATCH] Update basic filter for sources that include space between numbers Wasnts matching on vol. 1 ch. 10 previously so mangadex last chapter was showing volume number. --- .../main/java/eu/kanade/tachiyomi/util/ChapterRecognition.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/ChapterRecognition.kt b/app/src/main/java/eu/kanade/tachiyomi/util/ChapterRecognition.kt index 9c5b495037..45b2b67db8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/ChapterRecognition.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/ChapterRecognition.kt @@ -11,7 +11,7 @@ object ChapterRecognition { * All cases with Ch.xx * Mokushiroku Alice Vol.1 Ch. 4: Misrepresentation -R> 4 */ - private val basic = Regex("""(?<=ch\.)([0-9]+)(\.[0-9]+)?(\.?[a-z]+)?""") + private val basic = Regex("""(?<=ch\.) *([0-9]+)(\.[0-9]+)?(\.?[a-z]+)?""") /** * Regex used when only one number occurrence @@ -37,6 +37,7 @@ object ChapterRecognition { */ private val unwantedWhiteSpace = Regex("""(\s)(extra|special|omake)""") + fun parseChapterNumber(chapter: SChapter, manga: SManga) { // If chapter number is known return. if (chapter.chapter_number == -2f || chapter.chapter_number > -1f)