RainOfSnow: add rate limit 2/s (#7205)
This commit is contained in:
parent
7d05f193fe
commit
4cfe1f462f
|
@ -5,9 +5,13 @@ ext {
|
|||
extName = 'Rain Of Snow'
|
||||
pkgNameSuffix = 'en.rainofsnow'
|
||||
extClass = '.RainOfSnow'
|
||||
extVersionCode = 6
|
||||
extVersionCode = 7
|
||||
libVersion = '1.2'
|
||||
containsNsfw = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(path: ':lib-ratelimit')
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package eu.kanade.tachiyomi.extension.en.rainofsnow
|
||||
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
|
@ -28,9 +29,12 @@ open class RainOfSnow() : ParsedHttpSource() {
|
|||
|
||||
override val supportsLatest = false
|
||||
|
||||
private val rateLimitInterceptor = RateLimitInterceptor(2)
|
||||
|
||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||
.connectTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.addNetworkInterceptor(rateLimitInterceptor)
|
||||
.build()
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
|
|
Loading…
Reference in New Issue