From c3aefc90cbab8963c125a2ce766fbcbc882c13a0 Mon Sep 17 00:00:00 2001 From: Riztard Lanthorn Date: Sun, 14 Nov 2021 18:10:39 +0700 Subject: [PATCH] Manga Chill: fix chapter list & timestamp (#9810) * Manga Chill: fix chapter list & timestamp * some cleaning --- multisrc/overrides/genkan/lynxscans/src/LynxScans.kt | 2 +- .../madara/dragontranslation/src/DragonTranslation.kt | 2 +- .../madara/imperfectcomics/src/ImperfectComics.kt | 2 +- multisrc/overrides/madara/mangachill/src/MangaChill.kt | 10 ++++++++++ .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- .../tachiyomi/multisrc/mangadventure/MangAdventure.kt | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 multisrc/overrides/madara/mangachill/src/MangaChill.kt diff --git a/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt b/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt index 1c9811638..2b36dd312 100644 --- a/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt +++ b/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt @@ -4,7 +4,7 @@ import eu.kanade.tachiyomi.multisrc.genkan.Genkan import eu.kanade.tachiyomi.source.model.Page import org.jsoup.nodes.Document -class LynxScans : Genkan("LynxScans", "https://lynxscans.com", "en", "/web/comics") { +class LynxScans : Genkan("LynxScans", "https://lynxscans.com", "en", "/web/comics") { override fun pageListParse(document: Document): List { val pages = mutableListOf() diff --git a/multisrc/overrides/madara/dragontranslation/src/DragonTranslation.kt b/multisrc/overrides/madara/dragontranslation/src/DragonTranslation.kt index fd52661b9..e9b9563d5 100644 --- a/multisrc/overrides/madara/dragontranslation/src/DragonTranslation.kt +++ b/multisrc/overrides/madara/dragontranslation/src/DragonTranslation.kt @@ -17,7 +17,7 @@ class DragonTranslation : Madara("DragonTranslation", "https://dragontranslation } chapter.date_upload = select("img").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) } ?: select("span a").firstOrNull()?.attr("title")?.let { parseRelativeDate(it) } - ?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text()) + ?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text()) } return chapter diff --git a/multisrc/overrides/madara/imperfectcomics/src/ImperfectComics.kt b/multisrc/overrides/madara/imperfectcomics/src/ImperfectComics.kt index 306c9db76..4a11acc5c 100644 --- a/multisrc/overrides/madara/imperfectcomics/src/ImperfectComics.kt +++ b/multisrc/overrides/madara/imperfectcomics/src/ImperfectComics.kt @@ -4,6 +4,6 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara import java.text.SimpleDateFormat class ImperfectComics : Madara("Imperfect Comics", "https://imperfectcomic.com", "en", SimpleDateFormat("yyyy-MM-dd")) { - + override val useNewChapterEndpoint: Boolean = true } diff --git a/multisrc/overrides/madara/mangachill/src/MangaChill.kt b/multisrc/overrides/madara/mangachill/src/MangaChill.kt new file mode 100644 index 000000000..7d35b9d9f --- /dev/null +++ b/multisrc/overrides/madara/mangachill/src/MangaChill.kt @@ -0,0 +1,10 @@ +package eu.kanade.tachiyomi.extension.en.mangachill + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import java.text.SimpleDateFormat +import java.util.Locale + +class MangaChill : Madara("Manga Chill", "https://mangachill.com", "en", SimpleDateFormat("dd/MM/yyyy", Locale.US)) { + override val useNewChapterEndpoint: Boolean = true +} + diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index e5dacc122..60b84cb13 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -152,7 +152,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("MMScans", "https://mm-scans.com/", "en", overrideVersionCode = 1), SingleLang("Manga Action", "https://mangaaction.com", "en", overrideVersionCode = 2), SingleLang("Manga Bin", "https://mangabin.com/", "en", overrideVersionCode = 1), - SingleLang("Manga Chill", "https://mangachill.com/", "en", overrideVersionCode = 2), + SingleLang("Manga Chill", "https://mangachill.com", "en", overrideVersionCode = 3), SingleLang("Manga Crab", "https://mangacrab.com", "es"), SingleLang("Manga District", "https://mangadistrict.com", "en", isNsfw = true, overrideVersionCode = 1), SingleLang("Manga Diyari", "https://manga-diyari.com", "tr", overrideVersionCode = 2), diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt index ce37accb2..86344a3b5 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt @@ -7,7 +7,6 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.asObservableSuccess import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage -import eu.kanade.tachiyomi.source.model.Page as SPage import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource @@ -15,6 +14,7 @@ import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromJsonElement import okhttp3.Response import uy.kohesive.injekt.injectLazy +import eu.kanade.tachiyomi.source.model.Page as SPage /** MangAdventure base source. */ abstract class MangAdventure(