YaoiMangaOnline: fix pagination (#9404)

This commit is contained in:
ObserverOfTime 2021-10-09 12:53:50 +03:00 committed by GitHub
parent 604ad98b68
commit 7cbc1cf990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Yaoi Manga Online'
pkgNameSuffix = 'all.yaoimangaonline'
extClass = '.YaoiMangaOnline'
extVersionCode = 1
extVersionCode = 2
isNsfw = true
}

View File

@ -18,6 +18,7 @@ class YaoiMangaOnline : ParsedHttpSource() {
override val baseUrl = "https://yaoimangaonline.com"
// Popular is actually latest
override val supportsLatest = false
override fun latestUpdatesSelector() = popularMangaSelector()
@ -34,7 +35,7 @@ class YaoiMangaOnline : ParsedHttpSource() {
override fun popularMangaNextPageSelector() = searchMangaNextPageSelector()
override fun popularMangaRequest(page: Int) =
searchMangaRequest(page, "", FilterList())
GET("$baseUrl/page/$page/", headers)
override fun popularMangaFromElement(element: Element) =
searchMangaFromElement(element)
@ -57,6 +58,7 @@ class YaoiMangaOnline : ParsedHttpSource() {
else -> Unit
}
}
addEncodedPathSegments("page/$page")
addQueryParameter("s", query)
GET(toString(), headers)
}