parent
982be66732
commit
f8f7e5a50e
Binary file not shown.
Before Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 264 KiB |
|
@ -1,39 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.fleurblanche
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
|
||||||
import okhttp3.Interceptor
|
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import okhttp3.Response
|
|
||||||
import java.io.IOException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class FleurBlanche : Madara(
|
|
||||||
"Fleur Blanche",
|
|
||||||
"https://fleurscan.com",
|
|
||||||
"pt-BR",
|
|
||||||
SimpleDateFormat("MM/dd/yyyy", Locale("pt", "BR"))
|
|
||||||
) {
|
|
||||||
|
|
||||||
override val client: OkHttpClient = super.client.newBuilder()
|
|
||||||
.addInterceptor(::authWarningIntercept)
|
|
||||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
|
||||||
.build()
|
|
||||||
|
|
||||||
private fun authWarningIntercept(chain: Interceptor.Chain): Response {
|
|
||||||
val response = chain.proceed(chain.request())
|
|
||||||
|
|
||||||
if (response.request.url.toString().contains("wp-login.php")) {
|
|
||||||
response.close()
|
|
||||||
throw IOException(NEED_LOGIN)
|
|
||||||
}
|
|
||||||
|
|
||||||
return response
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val NEED_LOGIN = "É necessário realizar o login via WebView para acessar a fonte."
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -95,7 +95,6 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("FastManhwa", "https://fastmanhwa.net", "en", isNsfw = true, overrideVersionCode = 2),
|
SingleLang("FastManhwa", "https://fastmanhwa.net", "en", isNsfw = true, overrideVersionCode = 2),
|
||||||
SingleLang("Final Scans", "https://finalscans.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Final Scans", "https://finalscans.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("Fiz Manga", "https://fizmanga.com", "en"),
|
SingleLang("Fiz Manga", "https://fizmanga.com", "en"),
|
||||||
SingleLang("Fleur Blanche", "https://fleurscan.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
|
||||||
SingleLang("Fox White", "https://foxwhite.com.br", "pt-BR"),
|
SingleLang("Fox White", "https://foxwhite.com.br", "pt-BR"),
|
||||||
SingleLang("Free Manga", "https://freemanga.me", "en", isNsfw = true, overrideVersionCode = 3),
|
SingleLang("Free Manga", "https://freemanga.me", "en", isNsfw = true, overrideVersionCode = 3),
|
||||||
SingleLang("FreeWebtoonCoins", "https://freewebtooncoins.com", "en", overrideVersionCode = 1),
|
SingleLang("FreeWebtoonCoins", "https://freewebtooncoins.com", "en", overrideVersionCode = 1),
|
||||||
|
|
Loading…
Reference in New Issue