diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt index 853d632e5..665c5752b 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt @@ -9,7 +9,7 @@ class LibGenerator: ThemeSourceGenerator { override val themeClass = "LibGroup" - override val baseVersionCode: Int = 7 + override val baseVersionCode: Int = 8 override val sources = listOf( SingleLang("MangaLib", "https://mangalib.me", "ru", overrideVersionCode = 74), diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt index 550d366c1..c70180f45 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt @@ -13,8 +13,6 @@ import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.source.ConfigurableSource import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList -import okhttp3.Interceptor -import okhttp3.MediaType.Companion.toMediaType import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter @@ -22,6 +20,11 @@ import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.asJsoup import java.io.IOException +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit +import kotlin.math.absoluteValue +import kotlin.random.Random import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonArray @@ -35,6 +38,8 @@ import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive import okhttp3.Headers import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.Interceptor +import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response @@ -43,11 +48,6 @@ import rx.Observable import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy -import java.text.SimpleDateFormat -import java.util.Locale -import java.util.concurrent.TimeUnit -import kotlin.math.absoluteValue -import kotlin.random.Random abstract class LibGroup( @@ -79,7 +79,7 @@ abstract class LibGroup( override val client: OkHttpClient = network.cloudflareClient.newBuilder() .connectTimeout(30, TimeUnit.SECONDS) .readTimeout(1, TimeUnit.MINUTES) - .rateLimit(3,2) + .rateLimit(2) .addInterceptor { chain -> val response = chain.proceed(chain.request()) if (response.code == 419) @@ -144,7 +144,7 @@ abstract class LibGroup( } // Popular - override fun popularMangaRequest(page: Int) = GET("$baseUrl/login", headers) + override fun popularMangaRequest(page: Int) = GET(baseUrl, headers) override fun fetchPopularManga(page: Int): Observable { if (csrfToken.isEmpty()) { return client.newCall(popularMangaRequest(page))