From d156ff87c196ecf7016aca97f4829746f9cd4f11 Mon Sep 17 00:00:00 2001 From: Luqman Date: Tue, 27 Dec 2022 07:24:43 +0700 Subject: [PATCH] Komiku: fix search issue (#14670) Closes #13402 --- src/id/komiku/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/id/komiku/Komiku.kt | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/id/komiku/build.gradle b/src/id/komiku/build.gradle index 2c5120587..5819d5f68 100644 --- a/src/id/komiku/build.gradle +++ b/src/id/komiku/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Komiku' pkgNameSuffix = 'id.komiku' extClass = '.Komiku' - extVersionCode = 15 + extVersionCode = 16 } apply from: "$rootDir/common.gradle" diff --git a/src/id/komiku/src/eu/kanade/tachiyomi/extension/id/komiku/Komiku.kt b/src/id/komiku/src/eu/kanade/tachiyomi/extension/id/komiku/Komiku.kt index 13646a229..57cc57fe5 100644 --- a/src/id/komiku/src/eu/kanade/tachiyomi/extension/id/komiku/Komiku.kt +++ b/src/id/komiku/src/eu/kanade/tachiyomi/extension/id/komiku/Komiku.kt @@ -21,6 +21,8 @@ class Komiku : ParsedHttpSource() { override val baseUrl = "https://komiku.id" + private val baseUrlData = "https://data.komiku.id" + override val lang = "id" override val supportsLatest = true @@ -31,10 +33,10 @@ class Komiku : ParsedHttpSource() { override fun popularMangaSelector() = "div.bge" override fun popularMangaRequest(page: Int): Request { - if (page == 1) { - return GET("$baseUrl/other/hot/?orderby=meta_value_num", headers) + return if (page == 1) { + GET("$baseUrl/other/hot/?orderby=meta_value_num", headers) } else { - return GET("$baseUrl/other/hot/page/$page/?orderby=meta_value_num", headers) + GET("$baseUrl/other/hot/page/$page/?orderby=meta_value_num", headers) } } @@ -79,7 +81,7 @@ class Komiku : ParsedHttpSource() { override fun searchMangaSelector() = popularMangaSelector() override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - var url = "$baseUrl/pustaka/page/$page/".toHttpUrlOrNull()?.newBuilder()!!.addQueryParameter("s", query) + var url = "$baseUrlData/page/$page/?post_type=manga".toHttpUrlOrNull()?.newBuilder()!!.addQueryParameter("s", query) (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> when (filter) { is CategoryNames -> {