[TMO]-real_ratelimit_values (#6114)

Changed to Specifichostratelimit and added values to prevent failed update 409
This commit is contained in:
theeocorn 2021-03-09 17:00:39 -05:00 committed by GitHub
parent e10a9da2ae
commit 4d6136514a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'TuMangaOnline'
pkgNameSuffix = 'es.tumangaonline'
extClass = '.TuMangaOnline'
extVersionCode = 30
extVersionCode = 31
libVersion = '1.2'
}

View File

@ -4,7 +4,7 @@ import android.app.Application
import android.content.SharedPreferences
import android.support.v7.preference.ListPreference
import android.support.v7.preference.PreferenceScreen
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.lib.ratelimit.SpecificHostRateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.ConfigurableSource
@ -35,13 +35,15 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
override val baseUrl = "https://lectortmo.com"
val baseurl = HttpUrl.parse(baseUrl)!!
override val lang = "es"
override val supportsLatest = true
private val userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
private val rateLimitInterceptor = RateLimitInterceptor(1)
private val rateLimitInterceptor = SpecificHostRateLimitInterceptor(baseurl, 10, 60) // real ratelimit values
override val client: OkHttpClient = network.client.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor)