ManyToons: fix chapter list & search (#4459)
This commit is contained in:
parent
7ac206a61a
commit
987aa83570
|
@ -3,7 +3,7 @@ ext {
|
|||
extClass = '.ManyToon'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://manytoon.com'
|
||||
overrideVersionCode = 5
|
||||
overrideVersionCode = 6
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,35 @@
|
|||
package eu.kanade.tachiyomi.extension.en.manytoon
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Request
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
class ManyToon : Madara("ManyToon", "https://manytoon.com", "en") {
|
||||
|
||||
override val mangaSubString = "comic"
|
||||
|
||||
override val useNewChapterEndpoint: Boolean = true
|
||||
override val useNewChapterEndpoint = false
|
||||
override val sendViewCount = 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 {
|
||||
val form = FormBody.Builder()
|
||||
.add("action", "ajax_chap")
|
||||
.add("post_id", mangaId)
|
||||
.build()
|
||||
|
||||
return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, form)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue