From b4db1bfd4563cd6ae76c20f01d0bef1da9383096 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:24:24 -0300 Subject: [PATCH] Add a new source to Madara (closes #12133). (#12141) --- .../rainbowfairyscan/src/RainbowFairyScan.kt | 23 +++++++++++++++++++ .../multisrc/madara/MadaraGenerator.kt | 1 + 2 files changed, 24 insertions(+) create mode 100644 multisrc/overrides/madara/rainbowfairyscan/src/RainbowFairyScan.kt diff --git a/multisrc/overrides/madara/rainbowfairyscan/src/RainbowFairyScan.kt b/multisrc/overrides/madara/rainbowfairyscan/src/RainbowFairyScan.kt new file mode 100644 index 000000000..eb57a2a40 --- /dev/null +++ b/multisrc/overrides/madara/rainbowfairyscan/src/RainbowFairyScan.kt @@ -0,0 +1,23 @@ +package eu.kanade.tachiyomi.extension.pt.rainbowfairyscan + +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 RainbowFairyScan : Madara( + "Rainbow Fairy Scan", + "https://rainbowfairyscan.com", + "pt-BR", + SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(1, 2, TimeUnit.SECONDS) + .build() + + // Page has custom link to scan website. + override val popularMangaUrlSelector = "div.post-title a:not([target])" +} 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 bf4e167fd..261c43943 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 @@ -368,6 +368,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Pirulito Rosa", "https://pirulitorosa.site", "pt-BR", isNsfw = true), SingleLang("QueensManga ملكات المانجا", "https://queensmanga.com", "ar", className = "QueensManga", overrideVersionCode = 1), SingleLang("RagnarokScan", "https://ragnarokscan.com", "es"), + SingleLang("Rainbow Fairy Scan", "https://rainbowfairyscan.com", "pt-BR"), SingleLang("Random Scan", "https://randomscan.online", "pt-BR", overrideVersionCode = 4), SingleLang("Random Translations", "https://randomtranslations.com", "en", overrideVersionCode = 1), SingleLang("Raw Mangas", "https://rawmangas.net", "ja", isNsfw = true, overrideVersionCode = 2),