From 42f6a321633265c688c8f7330e826b4f6e84ca7d Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Tue, 24 Aug 2021 07:41:59 -0300 Subject: [PATCH] Add missing chapter scanlator in MM. (#8783) --- src/pt/muitomanga/build.gradle | 2 +- .../tachiyomi/extension/pt/muitomanga/MuitoManga.kt | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/pt/muitomanga/build.gradle b/src/pt/muitomanga/build.gradle index 936667c6b..cd3def8f1 100644 --- a/src/pt/muitomanga/build.gradle +++ b/src/pt/muitomanga/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Muito Mangá' pkgNameSuffix = 'pt.muitomanga' extClass = '.MuitoManga' - extVersionCode = 4 + extVersionCode = 5 libVersion = '1.2' containsNsfw = true } diff --git a/src/pt/muitomanga/src/eu/kanade/tachiyomi/extension/pt/muitomanga/MuitoManga.kt b/src/pt/muitomanga/src/eu/kanade/tachiyomi/extension/pt/muitomanga/MuitoManga.kt index e0139f304..faef355af 100644 --- a/src/pt/muitomanga/src/eu/kanade/tachiyomi/extension/pt/muitomanga/MuitoManga.kt +++ b/src/pt/muitomanga/src/eu/kanade/tachiyomi/extension/pt/muitomanga/MuitoManga.kt @@ -131,7 +131,7 @@ class MuitoManga : ParsedHttpSource() { override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply { name = element.select("a").first()!!.text() date_upload = element.select("small[title]").first()!!.text().toDate() - scanlator = element.select("scanlator2 a").joinToString { it.text().trim() } + scanlator = element.select("div.scanlator2 a").joinToString { it.text().trim() } setUrlWithoutDomain(element.select("a").first()!!.attr("abs:href")) } @@ -204,11 +204,8 @@ class MuitoManga : ParsedHttpSource() { } private fun String.toDate(): Long { - return try { - DATE_FORMATTER.parse(this)?.time ?: 0L - } catch (e: ParseException) { - 0L - } + return runCatching { DATE_FORMATTER.parse(this)?.time } + .getOrNull() ?: 0L } companion object {