add rate limiter to Shield Manga (#5922)
This commit is contained in:
parent
cbe5dac026
commit
0abfb4f701
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation project(':lib-ratelimit')
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.en.shieldmanga
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
class ShieldManga : Madara("Shield Manga", "https://shieldmanga.club", "en") {
|
||||||
|
private val rateLimitInterceptor = RateLimitInterceptor(1)
|
||||||
|
|
||||||
|
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||||
|
.connectTimeout(10, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
|
.addNetworkInterceptor(rateLimitInterceptor)
|
||||||
|
.build()
|
||||||
|
}
|
|
@ -188,7 +188,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Rüya Manga", "https://www.ruyamanga.com", "tr", className = "RuyaManga"),
|
SingleLang("Rüya Manga", "https://www.ruyamanga.com", "tr", className = "RuyaManga"),
|
||||||
SingleLang("S2Manga", "https://s2manga.com", "en"),
|
SingleLang("S2Manga", "https://s2manga.com", "en"),
|
||||||
SingleLang("Sekte Doujin", "https://sektedoujin.xyz", "id", isNsfw = true),
|
SingleLang("Sekte Doujin", "https://sektedoujin.xyz", "id", isNsfw = true),
|
||||||
SingleLang("Shield Manga", "https://shieldmanga.club", "en"),
|
SingleLang("Shield Manga", "https://shieldmanga.club", "en", overrideVersionCode = 1),
|
||||||
SingleLang("ShoujoHearts", "http://shoujohearts.com", "en"),
|
SingleLang("ShoujoHearts", "http://shoujohearts.com", "en"),
|
||||||
SingleLang("SiXiang Scans", "http://www.sixiangscans.com", "en"),
|
SingleLang("SiXiang Scans", "http://www.sixiangscans.com", "en"),
|
||||||
SingleLang("Siyahmelek", "https://siyahmelek.com", "tr", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Siyahmelek", "https://siyahmelek.com", "tr", isNsfw = true, overrideVersionCode = 1),
|
||||||
|
|
Loading…
Reference in New Issue