From b6585fb9e9dee72f90919e720855071cebbd8e3e Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:12:53 -0300 Subject: [PATCH] Add a new source to Madara (#18844) Add a new source to Madara. --- .../madara/manhastro/src/Manhastro.kt | 22 +++++++++++++++++++ .../multisrc/madara/MadaraGenerator.kt | 1 + 2 files changed, 23 insertions(+) create mode 100644 multisrc/overrides/madara/manhastro/src/Manhastro.kt diff --git a/multisrc/overrides/madara/manhastro/src/Manhastro.kt b/multisrc/overrides/madara/manhastro/src/Manhastro.kt new file mode 100644 index 000000000..95f23a696 --- /dev/null +++ b/multisrc/overrides/madara/manhastro/src/Manhastro.kt @@ -0,0 +1,22 @@ +package eu.kanade.tachiyomi.extension.pt.manhastro + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class Manhastro : Madara( + "Manhastro", + "https://manhastro.com", + "pt-BR", + SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")), +) { + + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(1, 2, TimeUnit.SECONDS) + .build() + + override val useNewChapterEndpoint = true +} 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 46dda2ee5..0beeb5fb0 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 @@ -317,6 +317,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Mangaxico", "https://mangaxico.com", "es", isNsfw = true), SingleLang("MangaXP", "https://mangaxp.com", "en", overrideVersionCode = 1), SingleLang("MangaYami", "https://www.mangayami.club", "en", overrideVersionCode = 2), + SingleLang("Manhastro", "https://manhastro.com", "pt-BR"), SingleLang("Manhatic", "https://manhatic.com", "ar", isNsfw = true), SingleLang("Manhua ES", "https://manhuaes.com", "en", overrideVersionCode = 6), SingleLang("Manhua Kiss", "https://manhuakiss.com", "en", isNsfw = true, overrideVersionCode = 1),