From 8d2ecf9cbdb6fa7f7084a49808ebe33944196f4d Mon Sep 17 00:00:00 2001 From: Taumer Date: Mon, 4 Jun 2018 14:55:20 +0300 Subject: [PATCH] Update date selector and chapter number recognition for readmanga/mintmanga (#343) Update date selector and chapter number recognition for readmanga/mintmanga --- src/ru/mintmanga/build.gradle | 4 ++-- .../kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt | 8 ++++---- src/ru/readmanga/build.gradle | 4 ++-- .../kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ru/mintmanga/build.gradle b/src/ru/mintmanga/build.gradle index e22ef8f3b..c9318c6c2 100644 --- a/src/ru/mintmanga/build.gradle +++ b/src/ru/mintmanga/build.gradle @@ -5,8 +5,8 @@ ext { appName = 'Tachiyomi: Mintmanga' pkgNameSuffix = "ru.mintmanga" extClass = '.Mintmanga' - extVersionCode = 4 - extVersionSuffix = 4 + extVersionCode = 5 + extVersionSuffix = 5 libVersion = '1.2' } diff --git a/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt b/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt index afa40dd7d..e3de83cd8 100644 --- a/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt +++ b/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt @@ -95,16 +95,16 @@ class Mintmanga : ParsedHttpSource() { } else { chapter.name = urlText } - chapter.date_upload = element.select("td:eq(1)").first()?.text()?.let { + chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let { SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time } ?: 0 return chapter } override fun prepareNewChapter(chapter: SChapter, manga: SManga) { - val basic = Regex("""\s([0-9]+)(\s-\s)([0-9]+)\s*""") - val extra = Regex("""\s([0-9]+\sЭкстра)\s*""") - val single = Regex("""\sСингл\s*""") + val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""") + val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""") + val single = Regex("""\s*Сингл\s*""") when { basic.containsMatchIn(chapter.name) -> { basic.find(chapter.name)?.let { diff --git a/src/ru/readmanga/build.gradle b/src/ru/readmanga/build.gradle index f6c4de4db..eb8ea43fb 100644 --- a/src/ru/readmanga/build.gradle +++ b/src/ru/readmanga/build.gradle @@ -5,8 +5,8 @@ ext { appName = 'Tachiyomi: Readmanga' pkgNameSuffix = "ru.readmanga" extClass = '.Readmanga' - extVersionCode = 4 - extVersionSuffix = 4 + extVersionCode = 5 + extVersionSuffix = 5 libVersion = '1.2' } diff --git a/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt b/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt index 8e8477127..097a94224 100644 --- a/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt +++ b/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt @@ -95,16 +95,16 @@ class Readmanga : ParsedHttpSource() { } else { chapter.name = urlText } - chapter.date_upload = element.select("td:eq(1)").first()?.text()?.let { + chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let { SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time } ?: 0 return chapter } override fun prepareNewChapter(chapter: SChapter, manga: SManga) { - val basic = Regex("""\s([0-9]+)(\s-\s)([0-9]+)\s*""") - val extra = Regex("""\s([0-9]+\sЭкстра)\s*""") - val single = Regex("""\sСингл\s*""") + val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""") + val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""") + val single = Regex("""\s*Сингл\s*""") when { basic.containsMatchIn(chapter.name) -> { basic.find(chapter.name)?.let {