Keyoapp: Fix duplicate entries (#8226)
* Fix duplicate entries * Remove delimiter Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com> --------- Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
This commit is contained in:
parent
8ee6d0184e
commit
ae982b97ca
@ -2,7 +2,7 @@ plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 15
|
||||
baseVersionCode = 16
|
||||
|
||||
dependencies {
|
||||
api(project(":lib:i18n"))
|
||||
|
@ -59,8 +59,16 @@ abstract class Keyoapp(
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request = GET(baseUrl, headers)
|
||||
|
||||
override fun popularMangaSelector(): String =
|
||||
"div.flex-col div.grid > div.group.border, div:has(h2:contains(Trending)) + div .group.overflow-hidden.grid"
|
||||
open val popularMangaTitleSelector = listOf(
|
||||
"Popular",
|
||||
"Popularie",
|
||||
"Trending",
|
||||
)
|
||||
|
||||
override fun popularMangaSelector(): String = selector(
|
||||
"div:contains(%s) + div .group.overflow-hidden.grid",
|
||||
popularMangaTitleSelector,
|
||||
)
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
|
||||
thumbnail_url = element.getImageUrl("*[style*=background-image]")
|
||||
@ -357,6 +365,10 @@ abstract class Keyoapp(
|
||||
return now.timeInMillis
|
||||
}
|
||||
|
||||
private fun selector(selector: String, contains: List<String>): String {
|
||||
return contains.joinToString { selector.replace("%s", it) }
|
||||
}
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||
SwitchPreferenceCompat(screen.context).apply {
|
||||
key = SHOW_PAID_CHAPTERS_PREF
|
||||
|
Loading…
x
Reference in New Issue
Block a user