fusion scanlation: add rate limit and dates (#8009)

* add ratelimit and dates

* add opverride
This commit is contained in:
OncePunchedMan 2021-07-08 14:24:35 +02:00 committed by GitHub
parent 5017db9388
commit 8dc35e3a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,4 @@
dependencies {
implementation project(':lib-ratelimit')
}

View File

@ -0,0 +1,18 @@
package eu.kanade.tachiyomi.extension.es.fusionscanlation
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit
import java.text.SimpleDateFormat
import java.util.Locale
class FusionScanlation : WPMangaReader("Fusion Scanlation", "https://fusionscanlation.com", "es", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es"))) {
private val rateLimitInterceptor = RateLimitInterceptor(1,2)
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.connectTimeout(10, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.addNetworkInterceptor(rateLimitInterceptor)
.build()
}

View File

@ -34,7 +34,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
SingleLang("YugenMangas", "https://yugenmangas.com", "es"), SingleLang("YugenMangas", "https://yugenmangas.com", "es"),
SingleLang("DragonTranslation", "https://dragontranslation.com", "es", isNsfw = true, overrideVersionCode = 1), SingleLang("DragonTranslation", "https://dragontranslation.com", "es", isNsfw = true, overrideVersionCode = 1),
SingleLang("Patatescans", "https://patatescans.com", "fr", isNsfw = true, overrideVersionCode = 1), SingleLang("Patatescans", "https://patatescans.com", "fr", isNsfw = true, overrideVersionCode = 1),
SingleLang("Fusion Scanlation", "https://fusionscanlation.com", "es"), SingleLang("Fusion Scanlation", "https://fusionscanlation.com", "es", className = "FusionScanlation", overrideVersionCode = 1),
SingleLang("Ace Scans", "https://acescans.xyz", "en"), SingleLang("Ace Scans", "https://acescans.xyz", "en"),
) )