From b798f1703927adb9e78deac3b6e004a8878a4645 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Thu, 5 May 2022 19:37:56 -0300 Subject: [PATCH] Add two new sources to Madara. (#11748) --- .../madara/covenscan/src/CovenScan.kt | 22 +++++++++++++++++ .../overrides/madara/helascan/src/HelaScan.kt | 24 +++++++++++++++++++ .../multisrc/madara/MadaraGenerator.kt | 2 ++ 3 files changed, 48 insertions(+) create mode 100644 multisrc/overrides/madara/covenscan/src/CovenScan.kt create mode 100644 multisrc/overrides/madara/helascan/src/HelaScan.kt diff --git a/multisrc/overrides/madara/covenscan/src/CovenScan.kt b/multisrc/overrides/madara/covenscan/src/CovenScan.kt new file mode 100644 index 000000000..0afaf75df --- /dev/null +++ b/multisrc/overrides/madara/covenscan/src/CovenScan.kt @@ -0,0 +1,22 @@ +package eu.kanade.tachiyomi.extension.pt.covenscan + +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 CovenScan : Madara( + "Coven Scan", + "https://covenscan.com", + "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 useNewChapterEndpoint = true +} diff --git a/multisrc/overrides/madara/helascan/src/HelaScan.kt b/multisrc/overrides/madara/helascan/src/HelaScan.kt new file mode 100644 index 000000000..e21904ac7 --- /dev/null +++ b/multisrc/overrides/madara/helascan/src/HelaScan.kt @@ -0,0 +1,24 @@ +package eu.kanade.tachiyomi.extension.pt.helascan + +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 HelaScan : Madara( + "Hela Scan", + "https://helascan.com", + "pt-BR", + SimpleDateFormat("dd 'de' MMMMM 'de' yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val useNewChapterEndpoint = true + + override val mangaDetailsSelectorTag = "" +} 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 0436e122f..4201be45f 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 @@ -75,6 +75,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Comictoon", "https://comictoonthaith-new.com", "th", isNsfw = true), SingleLang("Cookie Kiara", "https://18.kiara.cool", "en", isNsfw = true), SingleLang("CopyPasteScan", "https://copypastescan.xyz", "es", overrideVersionCode = 1), + SingleLang("Coven Scan", "https://covenscan.com", "pt-BR", isNsfw = true), SingleLang("Cronos Scan", "https://cronosscan.net", "pt-BR", overrideVersionCode = 1), SingleLang("DarkYue Realm", "https://darkyuerealm.site/web", "pt-BR", pkgName = "darkyurealm", overrideVersionCode = 4), SingleLang("Decadence Scans", "https://reader.decadencescans.com", "en", isNsfw = true, overrideVersionCode = 2), @@ -120,6 +121,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Harimanga", "https://harimanga.com", "en", overrideVersionCode = 1), SingleLang("Hattori Manga", "https://hattorimanga.com", "tr", isNsfw = true), SingleLang("Hayalistic", "https://hayalistic.com", "tr"), + SingleLang("Hela Scan", "https://helascan.com", "pt-BR", isNsfw = true), SingleLang("Hentai CB", "https://hentaicb.top", "vi", isNsfw = true, overrideVersionCode = 1, pkgName = "hentaicube"), SingleLang("Hentai Manga", "https://hentaimanga.me", "en", isNsfw = true, overrideVersionCode = 1), SingleLang("Hentai Teca", "https://hentaiteca.net", "pt-BR", isNsfw = true, overrideVersionCode = 1),