From 5d7f7e202a5bb6644172e25bae738922084fbb32 Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Sat, 22 Jan 2022 11:48:19 -0300 Subject: [PATCH] Add a new source to Madara (closes #10535). (#10541) --- .../madara/hentaiteca/src/HentaiTeca.kt | 24 +++++++++++++++++++ .../multisrc/madara/MadaraGenerator.kt | 1 + 2 files changed, 25 insertions(+) create mode 100644 multisrc/overrides/madara/hentaiteca/src/HentaiTeca.kt diff --git a/multisrc/overrides/madara/hentaiteca/src/HentaiTeca.kt b/multisrc/overrides/madara/hentaiteca/src/HentaiTeca.kt new file mode 100644 index 000000000..e06903582 --- /dev/null +++ b/multisrc/overrides/madara/hentaiteca/src/HentaiTeca.kt @@ -0,0 +1,24 @@ +package eu.kanade.tachiyomi.extension.pt.hentaiteca + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madara.Madara +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class HentaiTeca : Madara( + "Hentai Teca", + "https://hentaiteca.net", + "pt-BR", + SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val altName: String = "Nome alternativo: " + + override fun popularMangaSelector() = "div.page-item-detail.manga" +} 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 b0e7d1820..bd4317529 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 @@ -109,6 +109,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("HentaiXYuri", "https://hentaixyuri.com", "en", isNsfw = true), SingleLang("HentaiZone", "https://hentaizone.xyz", "fr", isNsfw = true), SingleLang("Hentaidexy", "https://hentaidexy.com", "en", isNsfw = true, overrideVersionCode = 2), + SingleLang("Hentai Teca", "https://hentaiteca.net", "pt-BR", isNsfw = true), SingleLang("Heroz Scanlation", "https://herozscans.com", "en", overrideVersionCode = 1), SingleLang("Hiperdex", "https://hiperdex.com", "en", isNsfw = true, overrideVersionCode = 5), SingleLang("Hizomanga", "https://hizomanga.com", "ar", overrideVersionCode = 1),