From fead080a07b16675cea12c52d66329d61167a96f Mon Sep 17 00:00:00 2001 From: scb261 <65343233+scb261@users.noreply.github.com> Date: Mon, 1 Mar 2021 20:30:16 +0200 Subject: [PATCH] ReadManhwa: use popular for all time instead of week (#6022) --- src/en/readmanhwa/build.gradle | 2 +- .../tachiyomi/extension/en/readmanhwa/ReadManhwa.kt | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/en/readmanhwa/build.gradle b/src/en/readmanhwa/build.gradle index 8b79e8e3d..3b1246877 100644 --- a/src/en/readmanhwa/build.gradle +++ b/src/en/readmanhwa/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'ReadManhwa' pkgNameSuffix = 'en.readmanhwa' extClass = '.ReadManhwa' - extVersionCode = 7 + extVersionCode = 8 libVersion = '1.2' containsNsfw = true } diff --git a/src/en/readmanhwa/src/eu/kanade/tachiyomi/extension/en/readmanhwa/ReadManhwa.kt b/src/en/readmanhwa/src/eu/kanade/tachiyomi/extension/en/readmanhwa/ReadManhwa.kt index 22da4c849..91ff2492a 100644 --- a/src/en/readmanhwa/src/eu/kanade/tachiyomi/extension/en/readmanhwa/ReadManhwa.kt +++ b/src/en/readmanhwa/src/eu/kanade/tachiyomi/extension/en/readmanhwa/ReadManhwa.kt @@ -81,7 +81,7 @@ class ReadManhwa : ConfigurableSource, HttpSource() { // Popular override fun popularMangaRequest(page: Int): Request { - return GET(getMangaUrl("$baseUrl/api/comics?per_page=36&page=$page&q=&sort=popularity&order=desc&duration=week"), headers) + return GET(getMangaUrl("$baseUrl/api/comics?per_page=36&page=$page&q=&sort=popularity&order=desc&duration=all"), headers) } override fun popularMangaParse(response: Response): MangasPage = parseMangaFromJson(response) @@ -102,7 +102,6 @@ class ReadManhwa : ConfigurableSource, HttpSource() { val url = HttpUrl.parse("$baseUrl/api/comics")!!.newBuilder() .addQueryParameter("per_page", "36") .addQueryParameter("page", page.toString()) - .addQueryParameter("order", "desc") .addQueryParameter("q", query) .addQueryParameter("nsfw", enableNsfw.toString()) @@ -136,13 +135,8 @@ class ReadManhwa : ConfigurableSource, HttpSource() { } } is OrderBy -> { - var orderby = "" - if (filter.state!!.ascending) { - orderby = "asc" - } else { - orderby = "desc" - } - var sort = arrayOf("uploaded_at", "title", "pages", "favorites", "popularity")[filter.state!!.index] + val orderby = if (filter.state!!.ascending) "asc" else "desc" + val sort = arrayOf("uploaded_at", "title", "pages", "favorites", "popularity")[filter.state!!.index] url.addQueryParameter("sort", sort) url.addQueryParameter("order", orderby) }