YugenMangas: Add ratelimit and increment connection timeout (#17032)

* Yugen is soooooooooo slow sometimes

* Add ratelimit

* Lol

* Lint

* Missing import

* ._.
This commit is contained in:
Rolando Lecca 2023-07-09 09:14:09 -05:00 committed by GitHub
parent 4847904078
commit 4ffac347f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -2,8 +2,10 @@ package eu.kanade.tachiyomi.extension.es.yugenmangas
import eu.kanade.tachiyomi.multisrc.heancms.Genre
import eu.kanade.tachiyomi.multisrc.heancms.HeanCms
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import java.text.SimpleDateFormat
import java.util.TimeZone
import java.util.concurrent.TimeUnit
class YugenMangas : HeanCms(
"YugenMangas",
@ -15,6 +17,12 @@ class YugenMangas : HeanCms(
// Site changed from Madara to HeanCms.
override val versionId = 2
override val client = super.client.newBuilder()
.connectTimeout(60, TimeUnit.SECONDS)
.readTimeout(90, TimeUnit.SECONDS)
.rateLimit(1, 1)
.build()
override val coverPath: String = ""
override val dateFormat: SimpleDateFormat = super.dateFormat.apply {

View File

@ -15,7 +15,7 @@ class HeanCmsGenerator : ThemeSourceGenerator {
SingleLang("Glorious Scan", "https://gloriousscan.com", "pt-BR", overrideVersionCode = 17),
SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 17),
SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 35),
SingleLang("YugenMangas", "https://yugenmangas.net", "es", isNsfw = true, overrideVersionCode = 3),
SingleLang("YugenMangas", "https://yugenmangas.net", "es", isNsfw = true, overrideVersionCode = 4),
)
companion object {