Komikcast: fix broken pagination (#13280)
* fix: latest update pagination & popular page * update overrideVersionCode * Apply suggestions from code review Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> * remove slash to fix 301 redirect Co-authored-by: Aris <maris@pmintl.net> Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>
This commit is contained in:
parent
8d2c252e46
commit
8f0a4c8903
|
@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class KomikCast : MangaThemesia(
|
class KomikCast : MangaThemesia(
|
||||||
"Komik Cast",
|
"Komik Cast",
|
||||||
"https://komikcast.me",
|
baseUrl = "https://komikcast.me",
|
||||||
"id",
|
"id",
|
||||||
mangaUrlDirectory = "/daftar-komik"
|
mangaUrlDirectory = "/daftar-komik"
|
||||||
) {
|
) {
|
||||||
|
@ -45,6 +45,15 @@ class KomikCast : MangaThemesia(
|
||||||
return GET(page.imageUrl!!, newHeaders)
|
return GET(page.imageUrl!!, newHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun popularMangaRequest(page: Int) = customPageRequest(page, "orderby", "popular")
|
||||||
|
override fun latestUpdatesRequest(page: Int) = customPageRequest(page, "sortby", "update")
|
||||||
|
|
||||||
|
private fun customPageRequest(page: Int, filterKey: String, filterValue: String): Request {
|
||||||
|
val pagePath = if (page > 1) "page/$page/" else ""
|
||||||
|
|
||||||
|
return GET("$baseUrl$mangaUrlDirectory/$pagePath?$filterKey=$filterValue", headers)
|
||||||
|
}
|
||||||
|
|
||||||
override fun searchMangaSelector() = "div.list-update_item"
|
override fun searchMangaSelector() = "div.list-update_item"
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element) = super.searchMangaFromElement(element).apply {
|
override fun searchMangaFromElement(element: Element) = super.searchMangaFromElement(element).apply {
|
||||||
|
|
|
@ -39,7 +39,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Kiryuu", "https://kiryuu.id", "id", overrideVersionCode = 6),
|
SingleLang("Kiryuu", "https://kiryuu.id", "id", overrideVersionCode = 6),
|
||||||
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
|
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Komik AV", "https://komikav.com", "id", overrideVersionCode = 1),
|
SingleLang("Komik AV", "https://komikav.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Komik Cast", "https://komikcast.me", "id", overrideVersionCode = 12),
|
SingleLang("Komik Cast", "https://komikcast.me", "id", overrideVersionCode = 13),
|
||||||
SingleLang("Komik Lab", "https://komiklab.com", "id"),
|
SingleLang("Komik Lab", "https://komiklab.com", "id"),
|
||||||
SingleLang("Komik Station", "https://komikstation.co", "id", overrideVersionCode = 3),
|
SingleLang("Komik Station", "https://komikstation.co", "id", overrideVersionCode = 3),
|
||||||
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
||||||
|
|
Loading…
Reference in New Issue