From 45d6042c81258896ac8450a008a286836561a522 Mon Sep 17 00:00:00 2001 From: Riztard Lanthorn Date: Tue, 7 Jun 2022 17:12:31 +0700 Subject: [PATCH] MangaBuddy: increasing rate limit to avoid ban (#12105) - increasing rate limit from 5/sec -> 1/sec --- .../madtheme/mangabuddy/src/MangaBuddy.kt | 36 +++---------------- .../multisrc/madtheme/MadThemeGenerator.kt | 2 +- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/multisrc/overrides/madtheme/mangabuddy/src/MangaBuddy.kt b/multisrc/overrides/madtheme/mangabuddy/src/MangaBuddy.kt index ffdd2d365..d1024305c 100644 --- a/multisrc/overrides/madtheme/mangabuddy/src/MangaBuddy.kt +++ b/multisrc/overrides/madtheme/mangabuddy/src/MangaBuddy.kt @@ -4,7 +4,6 @@ import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme import eu.kanade.tachiyomi.network.interceptor.rateLimitHost import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient -import java.util.concurrent.TimeUnit class MangaBuddy : MadTheme( "MangaBuddy", @@ -12,35 +11,10 @@ class MangaBuddy : MadTheme( "en" ) { override val client: OkHttpClient = network.cloudflareClient.newBuilder() - .rateLimitHost( - "https://s1.mbcdnv1.xyz".toHttpUrl(), - 5, - 1, - TimeUnit.SECONDS - ) - .rateLimitHost( - "https://s1.mbcdnv2.xyz".toHttpUrl(), - 1, - 2, - TimeUnit.SECONDS - ) - .rateLimitHost( - "https://s1.mbcdnv3.xyz".toHttpUrl(), - 1, - 2, - TimeUnit.SECONDS - ) - .rateLimitHost( - "https://s1.mbcdnv4.xyz".toHttpUrl(), - 1, - 2, - TimeUnit.SECONDS - ) - .rateLimitHost( - "https://s1.mbcdnv5.xyz".toHttpUrl(), - 1, - 2, - TimeUnit.SECONDS - ) + .rateLimitHost("https://s1.mbcdnv1.xyz".toHttpUrl(), 1, 1) + .rateLimitHost("https://s1.mbcdnv2.xyz".toHttpUrl(), 1, 2) + .rateLimitHost("https://s1.mbcdnv3.xyz".toHttpUrl(), 1, 2) + .rateLimitHost("https://s1.mbcdnv4.xyz".toHttpUrl(), 1, 2) + .rateLimitHost("https://s1.mbcdnv5.xyz".toHttpUrl(), 1, 2) .build() } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt index f454e8030..9319bf433 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt @@ -14,7 +14,7 @@ class MadThemeGenerator : ThemeSourceGenerator { override val sources = listOf( SingleLang("BeeHentai", "https://beehentai.com", "en", isNsfw = true), SingleLang("BoxManhwa", "https://boxmanhwa.com", "en", isNsfw = true), - SingleLang("MangaBuddy", "https://mangabuddy.com", "en", isNsfw = true, overrideVersionCode = 1), + SingleLang("MangaBuddy", "https://mangabuddy.com", "en", isNsfw = true, overrideVersionCode = 2), SingleLang("MangaCute", "https://mangacute.com", "en", isNsfw = true), SingleLang("MangaFab", "https://mangafab.com", "en", isNsfw = true), SingleLang("MangaForest", "https://mangaforest.com", "en", isNsfw = true),