From b28ef61618910d7652f63be09334db86762873b8 Mon Sep 17 00:00:00 2001 From: Gilfar Date: Sun, 20 Nov 2016 15:13:46 +0100 Subject: [PATCH] Better recent updates regexp for Mangasee (#539) --- .../kanade/tachiyomi/data/source/online/english/Mangasee.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangasee.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangasee.kt index c2bcc0c98..f744c374f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangasee.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangasee.kt @@ -28,7 +28,7 @@ class Mangasee(override val id: Int) : ParsedOnlineSource() { override val supportsLatest = true - private val recentUpdatesPattern = Pattern.compile("(.*?)\\s(\\d+)") + private val recentUpdatesPattern = Pattern.compile("(.*?)\\s(\\d+\\.?\\d*)\\s?(Completed)?") private val indexPattern = Pattern.compile("-index-(.*?)-") @@ -242,7 +242,7 @@ class Mangasee(override val id: Int) : ParsedOnlineSource() { val indexOfMangaUrl = chapterUrl.indexOf("-chapter-") val indexOfLastPath = chapterUrl.lastIndexOf("/") val mangaUrl = chapterUrl.substring(indexOfLastPath, indexOfMangaUrl) - val defaultText = it.select("p.clamp2").text(); + val defaultText = it.select("p.clamp2").text() val m = recentUpdatesPattern.matcher(defaultText) val title = if (m.matches()) m.group(1) else defaultText manga.setUrlWithoutDomain("/manga" + mangaUrl)