[WPMangaReader] Theme Update - Fixes Pagination (#6032)

* Fixes WPMangaReader Page URL

- Fixes page URLs
- Removed unnecessary Ngomik override
- Incremented version code

* Remove comment
This commit is contained in:
happywillow0 2021-03-02 13:10:31 -05:00 committed by GitHub
parent 7a667d78ed
commit a269ca31b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View File

@ -1,5 +0,0 @@
package eu.kanade.tachiyomi.extension.id.ngomik
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
class Ngomik : WPMangaReader("Ngomik", "https://ngomik.net", "id", "/all-komik")

View File

@ -32,7 +32,7 @@ abstract class WPMangaReader(
// popular // popular
override fun popularMangaSelector() = ".utao .uta .imgu, .listupd .bs .bsx " override fun popularMangaSelector() = ".utao .uta .imgu, .listupd .bs .bsx "
override fun popularMangaRequest(page: Int) = GET("$baseUrl$mangaUrlDirectory/?page/$page&order=popular", headers) override fun popularMangaRequest(page: Int) = GET("$baseUrl$mangaUrlDirectory/?page=$page&order=popular", headers)
override fun popularMangaFromElement(element: Element) = SManga.create().apply { override fun popularMangaFromElement(element: Element) = SManga.create().apply {
thumbnail_url = element.select("img").attr("src") thumbnail_url = element.select("img").attr("src")
@ -45,7 +45,7 @@ abstract class WPMangaReader(
// latest // latest
override fun latestUpdatesSelector() = popularMangaSelector() override fun latestUpdatesSelector() = popularMangaSelector()
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl$mangaUrlDirectory/?page/$page&order=update", headers) override fun latestUpdatesRequest(page: Int) = GET("$baseUrl$mangaUrlDirectory/?page=$page&order=update", headers)
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element) override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
@ -60,7 +60,7 @@ abstract class WPMangaReader(
val order = filters.findInstance<OrderByFilter>()?.toUriPart() val order = filters.findInstance<OrderByFilter>()?.toUriPart()
return when { return when {
order!!.isNotEmpty() -> GET("$baseUrl$mangaUrlDirectory/?page/$page&order=$order") order!!.isNotEmpty() -> GET("$baseUrl$mangaUrlDirectory/?page=$page&order=$order")
genre!!.isNotEmpty() -> GET("$baseUrl/genres/$genre/page/$page/?s=$query") genre!!.isNotEmpty() -> GET("$baseUrl/genres/$genre/page/$page/?s=$query")
else -> GET("$baseUrl/page/$page/?s=$query") else -> GET("$baseUrl/page/$page/?s=$query")
} }

View File

@ -9,7 +9,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
override val themeClass = "WPMangaReader" override val themeClass = "WPMangaReader"
override val baseVersionCode: Int = 1 override val baseVersionCode: Int = 2
override val sources = listOf( override val sources = listOf(
SingleLang("Hikari Scan", "https://hikariscan.com.br", "pt-BR", overrideVersionCode = 1), SingleLang("Hikari Scan", "https://hikariscan.com.br", "pt-BR", overrideVersionCode = 1),