Fixed Bentomanga (#16512)

* Creation/modification of the japanread source which became
bentomanga

I left the name and the image because it's the same source
with a new interface and name (people know japanread)

* rename and udpate lib of the japanread source which became
bentomanga
+
update of build.gradle

* add old id of japanread

* Update src/fr/japanread/build.gradle

Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>

* Update src/fr/japanread/build.gradle

Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>

* Update src/fr/japanread/src/eu/kanade/tachiyomi/extension/fr/japanread/bentomanga.kt

Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>

* Update src/fr/japanread/src/eu/kanade/tachiyomi/extension/fr/japanread/bentomanga.kt

Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>

* renaming file to BentoManga

* Attempt to avoid triggering cloudflare

Can make the source slower.

* Attempt to avoid triggering cloudflare

Can make the source slower.

---------

Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>
This commit is contained in:
Adam B 2023-06-06 11:23:01 +02:00 committed by GitHub
parent 64ac44dff9
commit d88776ce6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Bento Manga'
pkgNameSuffix = 'fr.japanread'
extClass = '.BentoManga'
extVersionCode = 12
extVersionCode = 13
isNsfw = true
}

View File

@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.extension.fr.japanread
import android.net.Uri
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
@ -23,6 +24,7 @@ import org.jsoup.nodes.Element
import rx.Observable
import uy.kohesive.injekt.injectLazy
import java.util.Calendar
import java.util.concurrent.TimeUnit
class BentoManga : ParsedHttpSource() {
@ -38,7 +40,11 @@ class BentoManga : ParsedHttpSource() {
private val json: Json by injectLazy()
override val client: OkHttpClient = network.cloudflareClient
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.connectTimeout(15, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.rateLimit(2,1)
.build()
override fun headersBuilder(): Headers.Builder = Headers.Builder()
.add("Referer", "$baseUrl/")