From d418d46b23828ff1e42464f53518054092636757 Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Fri, 4 Feb 2022 07:27:13 -0300 Subject: [PATCH] Add a new source to WpMangaReader (closes #10651). (#10683) --- .../mangaschan/src/MangasChan.kt | 22 +++++++++++++++++++ .../wpmangareader/WPMangaReaderGenerator.kt | 1 + 2 files changed, 23 insertions(+) create mode 100644 multisrc/overrides/wpmangareader/mangaschan/src/MangasChan.kt diff --git a/multisrc/overrides/wpmangareader/mangaschan/src/MangasChan.kt b/multisrc/overrides/wpmangareader/mangaschan/src/MangasChan.kt new file mode 100644 index 000000000..2f1cee7d7 --- /dev/null +++ b/multisrc/overrides/wpmangareader/mangaschan/src/MangasChan.kt @@ -0,0 +1,22 @@ +package eu.kanade.tachiyomi.extension.pt.mangaschan + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangasChan : WPMangaReader( + "Mangás Chan", + "https://mangaschan.com", + "pt-BR", + dateFormat = SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addNetworkInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val altName = "Nome alternativo: " +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt index 10b56f9a8..17a272773 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt @@ -24,6 +24,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator { SingleLang("MangaKita", "https://mangakita.net", "id", overrideVersionCode = 1), SingleLang("Gabut Scans", "https://gabutscans.com", "id"), SingleLang("Graze Scans", "https://grazescans.com", "en", overrideVersionCode = 2), + SingleLang("Mangás Chan", "https://mangaschan.com", "pt-BR", className = "MangasChan"), SingleLang("Martial Manga", "https://martialmanga.com", "es"), SingleLang("Ngomik", "https://ngomik.net", "id", overrideVersionCode = 1), SingleLang("Sekaikomik", "https://www.sekaikomik.site", "id", isNsfw = true, overrideVersionCode = 8),