Patch ReaperScans (#6982)
* Patch ReaperScans * Resolve some mistakes Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com> --------- Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
This commit is contained in:
parent
b7409c8efd
commit
4a1a040b23
|
@ -228,7 +228,7 @@ abstract class Keyoapp(
|
|||
}.joinToString()
|
||||
}
|
||||
|
||||
private fun Element?.parseStatus(): Int = when (this?.text()?.lowercase()) {
|
||||
protected fun Element?.parseStatus(): Int = when (this?.text()?.lowercase()) {
|
||||
"ongoing" -> SManga.ONGOING
|
||||
"dropped" -> SManga.CANCELLED
|
||||
"paused" -> SManga.ON_HIATUS
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package eu.kanade.tachiyomi.extension.fr.reaperscans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class ReaperScans : Keyoapp(
|
||||
"Reaper Scans",
|
||||
|
@ -8,6 +10,18 @@ class ReaperScans : Keyoapp(
|
|||
"fr",
|
||||
) {
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga =
|
||||
super.mangaDetailsParse(document).apply {
|
||||
if (description.isNullOrBlank() == true) {
|
||||
description = document.selectFirst("#expand_content > p")?.text()
|
||||
}
|
||||
|
||||
// Search for the sibling div of the image with the status icon
|
||||
status = document.selectFirst("div:has(> img[src*=status]) + div").parseStatus()
|
||||
|
||||
genre = document.select("div:has(>h1) > div > a").joinToString { it.text() }
|
||||
}
|
||||
|
||||
// Migrated from Madara to Keyoapp.
|
||||
override val versionId = 4
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue