ManyToon | Fix Search (#4480)

* Fix Search

* Little Change

* lint
This commit is contained in:
KenjieDec 2024-08-08 09:28:18 +07:00 committed by Draff
parent 4955c0f1e5
commit a27b852546
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 3 additions and 12 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.ManyToon' extClass = '.ManyToon'
themePkg = 'madara' themePkg = 'madara'
baseUrl = 'https://manytoon.com' baseUrl = 'https://manytoon.com'
overrideVersionCode = 6 overrideVersionCode = 7
isNsfw = true isNsfw = true
} }

View File

@ -2,10 +2,8 @@ package eu.kanade.tachiyomi.extension.en.manytoon
import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.FormBody import okhttp3.FormBody
import okhttp3.Request import okhttp3.Request
import org.jsoup.nodes.Element
class ManyToon : Madara("ManyToon", "https://manytoon.com", "en") { class ManyToon : Madara("ManyToon", "https://manytoon.com", "en") {
@ -15,15 +13,6 @@ class ManyToon : Madara("ManyToon", "https://manytoon.com", "en") {
override val sendViewCount = false override val sendViewCount = false
override val fetchGenres = false override val fetchGenres = false
override fun searchMangaSelector() = "li.movie-item > a"
override fun searchMangaFromElement(element: Element): SManga {
return SManga.create().apply {
setUrlWithoutDomain(element.absUrl("href"))
title = element.attr("title")
}
}
override fun oldXhrChaptersRequest(mangaId: String): Request { override fun oldXhrChaptersRequest(mangaId: String): Request {
val form = FormBody.Builder() val form = FormBody.Builder()
.add("action", "ajax_chap") .add("action", "ajax_chap")
@ -32,4 +21,6 @@ class ManyToon : Madara("ManyToon", "https://manytoon.com", "en") {
return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, form) return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, form)
} }
override fun searchMangaSelector() = "div.page-item-detail"
} }