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:
Romain 2025-01-05 01:36:52 +01:00 committed by Draff
parent b7409c8efd
commit 4a1a040b23
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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
} }