From 06719cffd5fbe44aaa1418f4900a12f96ad33b86 Mon Sep 17 00:00:00 2001 From: Vetle Ledaal Date: Fri, 15 Sep 2023 18:58:47 +0000 Subject: [PATCH] ToonGod: update domain, pagination, and use defaults (#17958) --- multisrc/overrides/madara/toongod/src/ToonGod.kt | 13 ++++--------- .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/multisrc/overrides/madara/toongod/src/ToonGod.kt b/multisrc/overrides/madara/toongod/src/ToonGod.kt index 54a6d271f..9f8bbb409 100644 --- a/multisrc/overrides/madara/toongod/src/ToonGod.kt +++ b/multisrc/overrides/madara/toongod/src/ToonGod.kt @@ -1,17 +1,12 @@ package eu.kanade.tachiyomi.extension.en.toongod import eu.kanade.tachiyomi.multisrc.madara.Madara -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.source.model.Page -import okhttp3.Request import java.text.SimpleDateFormat import java.util.Locale -class ToonGod : Madara("ToonGod", "https://www.toongod.com", "en", SimpleDateFormat("dd MMM yyyy", Locale.US)) { - override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/webtoons/page/$page/?m_orderby=views", headers) - override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/webtoons/page/$page/?m_orderby=latest", headers) +class ToonGod : Madara("ToonGod", "https://www.toongod.org", "en", SimpleDateFormat("d MMM yyyy", Locale.US)) { override val mangaSubString = "webtoons" - override fun imageRequest(page: Page): Request { - return GET(page.imageUrl!!, headers) - } + override val useNewChapterEndpoint = false + + override fun searchPage(page: Int): String = if (page == 1) "" else "page/$page/" } 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 0c3e8fc5e..cf3263110 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 @@ -469,7 +469,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Todaymic", "https://todaymic.com", "en", overrideVersionCode = 1), SingleLang("TonizuToon", "https://tonizutoon.com", "tr", isNsfw = true), SingleLang("ToonChill", "https://toonchill.com", "en", overrideVersionCode = 1), - SingleLang("ToonGod", "https://www.toongod.com", "en", isNsfw = true, overrideVersionCode = 4), + SingleLang("ToonGod", "https://www.toongod.org", "en", isNsfw = true, overrideVersionCode = 5), SingleLang("Toonily.net", "https://toonily.net", "en", isNsfw = true, className = "Toonilynet", overrideVersionCode = 2), SingleLang("Toonily", "https://toonily.com", "en", isNsfw = true, overrideVersionCode = 11), SingleLang("Toonizy", "https://toonizy.com", "en", isNsfw = true),