From 190d406ef01a3d41eb9c18bf6a6457381665ce42 Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Sun, 21 Nov 2021 20:40:25 -0300 Subject: [PATCH] Add two new sources to Madara. (#9889) --- .../overrides/madara/owscan/src/OwScan.kt | 17 +++++++++++++ .../madara/shieldmanga/src/ShieldManga.kt | 1 - .../madara/smashscan/src/SmashScan.kt | 24 +++++++++++++++++++ .../multisrc/madara/MadaraGenerator.kt | 2 ++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 multisrc/overrides/madara/owscan/src/OwScan.kt create mode 100644 multisrc/overrides/madara/smashscan/src/SmashScan.kt diff --git a/multisrc/overrides/madara/owscan/src/OwScan.kt b/multisrc/overrides/madara/owscan/src/OwScan.kt new file mode 100644 index 000000000..67c68f75e --- /dev/null +++ b/multisrc/overrides/madara/owscan/src/OwScan.kt @@ -0,0 +1,17 @@ +package eu.kanade.tachiyomi.extension.pt.owscan + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madara.Madara +import okhttp3.OkHttpClient +import java.util.concurrent.TimeUnit + +class OwScan : Madara("Ow Scan", "https://owscan.com", "pt-BR") { + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val altName = "Nome alternativo: " + + override fun popularMangaSelector() = "div.page-item-detail.manga" +} diff --git a/multisrc/overrides/madara/shieldmanga/src/ShieldManga.kt b/multisrc/overrides/madara/shieldmanga/src/ShieldManga.kt index c24f51268..16120bc3a 100644 --- a/multisrc/overrides/madara/shieldmanga/src/ShieldManga.kt +++ b/multisrc/overrides/madara/shieldmanga/src/ShieldManga.kt @@ -15,5 +15,4 @@ class ShieldManga : Madara("Shield Manga", "https://shieldmanga.club", "en") { .build() override fun chapterListSelector() = "li.wp-manga-hapter, .version-chap li" - } diff --git a/multisrc/overrides/madara/smashscan/src/SmashScan.kt b/multisrc/overrides/madara/smashscan/src/SmashScan.kt new file mode 100644 index 000000000..7d141b897 --- /dev/null +++ b/multisrc/overrides/madara/smashscan/src/SmashScan.kt @@ -0,0 +1,24 @@ +package eu.kanade.tachiyomi.extension.pt.smashscan + +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 SmashScan : Madara( + "Smash Scan", + "https://smashscan.com.br", + "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 altName = "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 fe11997d1..b19a39444 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 @@ -316,6 +316,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Oh No Manga", "https://ohnomanga.com", "en", isNsfw = true), SingleLang("Olho da Lua", "https://olhodalua.xyz", "pt-BR", className = "OlhoDaLua", overrideVersionCode = 1), SingleLang("Origami Orpheans", "https://origami-orpheans.com.br", "pt-BR", overrideVersionCode = 3), + SingleLang("Ow Scan", "https://owscan.com", "pt-BR"), SingleLang("OTksScanlator", "https://otkscanlator.xyz", "pt-BR", isNsfw = true, className = "OtksScanlator"), SingleLang("Paean Scans", "https://paeanscans.com", "en", overrideVersionCode = 1), SingleLang("Painful Nightz Scan", "https://painfulnightzscan.com", "en"), @@ -361,6 +362,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("SkyRaws", "https://skyraws.com", "en", overrideVersionCode = 1), SingleLang("Sleeping Knight Scans", "https://skscans.com", "en", overrideVersionCode = 2), SingleLang("Sleepy Translations", "https://sleepytranslations.com", "en", overrideVersionCode = 1), + SingleLang("Smash Scan", "https://smashscan.com.br", "pt-BR"), SingleLang("SodaScan", "https://sodascan.xyz", "pt-BR", isNsfw = true), SingleLang("Solo Leveling", "https://readsololeveling.online", "en"), SingleLang("StageComics", "https://stagecomics.com", "pt-BR", overrideVersionCode = 3),