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()
|
}.joinToString()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Element?.parseStatus(): Int = when (this?.text()?.lowercase()) {
|
protected fun Element?.parseStatus(): Int = when (this?.text()?.lowercase()) {
|
||||||
"ongoing" -> SManga.ONGOING
|
"ongoing" -> SManga.ONGOING
|
||||||
"dropped" -> SManga.CANCELLED
|
"dropped" -> SManga.CANCELLED
|
||||||
"paused" -> SManga.ON_HIATUS
|
"paused" -> SManga.ON_HIATUS
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.extension.fr.reaperscans
|
package eu.kanade.tachiyomi.extension.fr.reaperscans
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
class ReaperScans : Keyoapp(
|
class ReaperScans : Keyoapp(
|
||||||
"Reaper Scans",
|
"Reaper Scans",
|
||||||
|
@ -8,6 +10,18 @@ class ReaperScans : Keyoapp(
|
||||||
"fr",
|
"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.
|
// Migrated from Madara to Keyoapp.
|
||||||
override val versionId = 4
|
override val versionId = 4
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue