Add two new sources to Madara. (#13232)
This commit is contained in:
parent
9f6f67c676
commit
b3220a05d1
|
@ -0,0 +1,40 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.pt.mryaoifansub
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import okhttp3.Interceptor
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.Response
|
||||||
|
import okhttp3.internal.closeQuietly
|
||||||
|
import java.io.IOException
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
class MrYaoiFansub : Madara(
|
||||||
|
"MR Yaoi Fansub",
|
||||||
|
"https://mrtenzus.com",
|
||||||
|
"pt-BR",
|
||||||
|
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
|
||||||
|
) {
|
||||||
|
|
||||||
|
override val client: OkHttpClient = super.client.newBuilder()
|
||||||
|
.addInterceptor(::loginCheckIntercept)
|
||||||
|
.rateLimit(1, 2, TimeUnit.SECONDS)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
private fun loginCheckIntercept(chain: Interceptor.Chain): Response {
|
||||||
|
val response = chain.proceed(chain.request())
|
||||||
|
|
||||||
|
if (response.request.url.queryParameter("password-protected").isNullOrEmpty()) {
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
|
response.closeQuietly()
|
||||||
|
throw IOException(LOGIN_THROUGH_WEBVIEW_ERROR)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val LOGIN_THROUGH_WEBVIEW_ERROR = "Autentique-se pela WebView para usar a extensão."
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.pt.portalyaoi
|
||||||
|
|
||||||
|
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 PortalYaoi : Madara(
|
||||||
|
"Portal Yaoi",
|
||||||
|
"https://portalyaoi.com",
|
||||||
|
"pt-BR",
|
||||||
|
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
|
||||||
|
) {
|
||||||
|
|
||||||
|
override val client: OkHttpClient = super.client.newBuilder()
|
||||||
|
.rateLimit(1, 2, TimeUnit.SECONDS)
|
||||||
|
.build()
|
||||||
|
}
|
|
@ -353,6 +353,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Momo no Hana Scan", "https://momonohanascan.com", "pt-BR", className = "MomoNoHanaScan", overrideVersionCode = 1),
|
SingleLang("Momo no Hana Scan", "https://momonohanascan.com", "pt-BR", className = "MomoNoHanaScan", overrideVersionCode = 1),
|
||||||
SingleLang("MonarcaManga", "https://monarcamanga.com", "es"),
|
SingleLang("MonarcaManga", "https://monarcamanga.com", "es"),
|
||||||
SingleLang("Mortals Groove", "https://mortalsgroove.com", "en", overrideVersionCode = 1),
|
SingleLang("Mortals Groove", "https://mortalsgroove.com", "en", overrideVersionCode = 1),
|
||||||
|
SingleLang("MR Yaoi Fansub", "https://mrtenzus.com", "pt-BR", isNsfw = true, className = "MrYaoiFansub"),
|
||||||
SingleLang("Muctau", "https://muctau.com", "en", overrideVersionCode = 1),
|
SingleLang("Muctau", "https://muctau.com", "en", overrideVersionCode = 1),
|
||||||
SingleLang("MurimScan", "https://murimscan.run", "en", isNsfw = true),
|
SingleLang("MurimScan", "https://murimscan.run", "en", isNsfw = true),
|
||||||
SingleLang("MyKomiks", "https://mykomiks.fun", "en", overrideVersionCode = 2),
|
SingleLang("MyKomiks", "https://mykomiks.fun", "en", overrideVersionCode = 2),
|
||||||
|
@ -383,6 +384,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("PoManga", "https://pomanga.com", "en"),
|
SingleLang("PoManga", "https://pomanga.com", "en"),
|
||||||
SingleLang("PornComix", "https://www.porncomixonline.net", "en", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("PornComix", "https://www.porncomixonline.net", "en", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("Pornwha", "https://pornwha.com", "en", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Pornwha", "https://pornwha.com", "en", isNsfw = true, overrideVersionCode = 1),
|
||||||
|
SingleLang("Portal Yaoi", "https://portalyaoi.com", "pt-BR", isNsfw = true),
|
||||||
SingleLang("Prisma Hentais", "https://prismahentai.com", "pt-BR", isNsfw = true),
|
SingleLang("Prisma Hentais", "https://prismahentai.com", "pt-BR", isNsfw = true),
|
||||||
SingleLang("Prisma Scans", "https://prismascans.net", "pt-BR", overrideVersionCode = 2),
|
SingleLang("Prisma Scans", "https://prismascans.net", "pt-BR", overrideVersionCode = 2),
|
||||||
SingleLang("Projeto Scanlator", "https://projetoscanlator.com", "pt-BR", overrideVersionCode = 3),
|
SingleLang("Projeto Scanlator", "https://projetoscanlator.com", "pt-BR", overrideVersionCode = 3),
|
||||||
|
|
Loading…
Reference in New Issue