
* Rewrite MMRCMS * linting * Mangas.in: Fix latest, search by query, manga details * use HashSet instead of Set for manga detail keys * use buildList for building filter list * mangas.in: Copy over changes to MangasInDto * Use a better metric for determining if filter fetching failed. Also merged types and tags. * Move to using named constructor parameters instead of open vals This improves the discoverability of configurable stuff. * use normal try/catch instead of runCatching * Elaborate on the reason for not using Nothing * Make most configuration options private * forbidden -> useNamedArgumentsBelow * Address lint failures * Close the thingies * <:shitting:1130237162105876490> * <:shitting:1130237162105876490>
33 lines
1.3 KiB
Kotlin
33 lines
1.3 KiB
Kotlin
package eu.kanade.tachiyomi.extension.ar.onma
|
|
|
|
import eu.kanade.tachiyomi.multisrc.mmrcms.MMRCMS
|
|
import eu.kanade.tachiyomi.source.model.SManga
|
|
import org.jsoup.nodes.Document
|
|
|
|
class Onma : MMRCMS(
|
|
"مانجا اون لاين",
|
|
"https://onma.top",
|
|
"ar",
|
|
detailsTitleSelector = ".panel-heading",
|
|
) {
|
|
override fun searchMangaSelector() = "div.chapter-container"
|
|
|
|
override fun mangaDetailsParse(document: Document): SManga {
|
|
return super.mangaDetailsParse(document).apply {
|
|
document.select(".panel-body h3").forEach { element ->
|
|
when (element.ownText().lowercase().removeSuffix(" :")) {
|
|
in detailAuthor -> author = element.selectFirst("div.text")!!.text()
|
|
in detailArtist -> artist = element.selectFirst("div.text")!!.text()
|
|
in detailGenre -> genre = element.select("div.text a").joinToString { it.text() }
|
|
in detailStatus -> status = when (element.selectFirst("div.text")!!.text()) {
|
|
in detailStatusComplete -> SManga.COMPLETED
|
|
in detailStatusOngoing -> SManga.ONGOING
|
|
in detailStatusDropped -> SManga.CANCELLED
|
|
else -> SManga.UNKNOWN
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|