From 498879ec2c218cac8b896cb62ca3f57390f76042 Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Wed, 4 Sep 2019 07:12:46 -0400 Subject: [PATCH] MangaRock chapter delay fix 2 (#1460) MangaRock chapter delay fix 2 --- src/en/mangarock/build.gradle | 2 +- .../tachiyomi/extension/en/mangarock/MangaRock.kt | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/en/mangarock/build.gradle b/src/en/mangarock/build.gradle index 9c8774ad6..3f268eef7 100644 --- a/src/en/mangarock/build.gradle +++ b/src/en/mangarock/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: Manga Rock' pkgNameSuffix = 'en.mangarock' extClass = '.MangaRock' - extVersionCode = 13 + extVersionCode = 14 libVersion = '1.2' } diff --git a/src/en/mangarock/src/eu/kanade/tachiyomi/extension/en/mangarock/MangaRock.kt b/src/en/mangarock/src/eu/kanade/tachiyomi/extension/en/mangarock/MangaRock.kt index daf124841..9918af480 100644 --- a/src/en/mangarock/src/eu/kanade/tachiyomi/extension/en/mangarock/MangaRock.kt +++ b/src/en/mangarock/src/eu/kanade/tachiyomi/extension/en/mangarock/MangaRock.kt @@ -12,7 +12,12 @@ import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource -import okhttp3.* +import okhttp3.MediaType +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.RequestBody +import okhttp3.Response +import okhttp3.ResponseBody import org.json.JSONObject import rx.Observable import java.util.ArrayList @@ -35,9 +40,6 @@ class MangaRock : HttpSource() { override val supportsLatest = true - override fun headersBuilder(): Headers.Builder = Headers.Builder() - .add("Origin", "https://mangarock.com") - // Handles the page decoding override val client: OkHttpClient = super.client.newBuilder().addInterceptor(fun(chain): Response { val url = chain.request().url().toString() @@ -186,11 +188,11 @@ class MangaRock : HttpSource() { private fun getMangaApiRequest(manga: SManga): Request { // Handle older entries with API URL ("/info?oid=mrs-series-...") if (manga.url.startsWith("/info")) { - return GET("$apiUrl${manga.url}&country=", headers) + return GET("$apiUrl${manga.url}&Country=", headers) } val oid = manga.url.substringAfterLast("/") - return GET("$apiUrl/info?oid=$oid&country=", headers) + return GET("$apiUrl/info?oid=$oid&Country=", headers) } override fun mangaDetailsParse(response: Response) = SManga.create().apply {