From 5f5fbf6ef180a11aac2727ddc7d93e3e686a38bc Mon Sep 17 00:00:00 2001 From: Eshlender <35057681+e-shl@users.noreply.github.com> Date: Wed, 9 Nov 2022 23:48:06 +0500 Subject: [PATCH] [RU]Remanga rateLimitHost boost slow image after Many Requests (#14200) * [RU]Remanga rateLimitHost boost slow image after Many Requests * only confirmed --- src/ru/remanga/build.gradle | 2 +- .../src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ru/remanga/build.gradle b/src/ru/remanga/build.gradle index 0907720d8..9947cb2dd 100644 --- a/src/ru/remanga/build.gradle +++ b/src/ru/remanga/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Remanga' pkgNameSuffix = 'ru.remanga' extClass = '.Remanga' - extVersionCode = 60 + extVersionCode = 61 } dependencies { diff --git a/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt b/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt index f9c9a8b3c..95484736b 100644 --- a/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt +++ b/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt @@ -21,6 +21,7 @@ import eu.kanade.tachiyomi.extension.ru.remanga.dto.UserDto import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.asObservable import eu.kanade.tachiyomi.network.asObservableSuccess +import eu.kanade.tachiyomi.network.interceptor.rateLimitHost import eu.kanade.tachiyomi.source.ConfigurableSource import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList @@ -115,6 +116,8 @@ class Remanga : ConfigurableSource, HttpSource() { } override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .rateLimitHost("https://img3.reimg.org".toHttpUrl(), 2) + .rateLimitHost("https://img5.reimg.org".toHttpUrl(), 2) .addInterceptor { imageContentTypeIntercept(it) } .addInterceptor { authIntercept(it) } .build()