Fix status parsing for PhenixScans and SushiScan (#16988)
This commit is contained in:
parent
4e17c228ca
commit
8ad0505cd1
|
@ -1,7 +1,24 @@
|
|||
package eu.kanade.tachiyomi.extension.fr.phenixscans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import org.jsoup.nodes.Document
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class PhenixScans : MangaThemesia("PhenixScans", "https://phenixscans.fr", "fr", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.FRENCH))
|
||||
class PhenixScans : MangaThemesia("PhenixScans", "https://phenixscans.fr", "fr", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.FRENCH)) {
|
||||
override val seriesAuthorSelector = ".imptdt:contains(Auteur) i, .fmed b:contains(Auteur)+span"
|
||||
override val seriesStatusSelector = ".imptdt:contains(Statut) i"
|
||||
|
||||
override fun String?.parseStatus(): Int = when {
|
||||
this == null -> SManga.UNKNOWN
|
||||
this.contains("En Cours", ignoreCase = true) -> SManga.ONGOING
|
||||
this.contains("Terminé", ignoreCase = true) -> SManga.COMPLETED
|
||||
else -> SManga.UNKNOWN
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga =
|
||||
super.mangaDetailsParse(document).apply {
|
||||
status = document.select(seriesStatusSelector).text().parseStatus()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ import java.util.Locale
|
|||
|
||||
class SushiScan : MangaThemesia("Sushi-Scan", "https://sushiscan.net", "fr", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.FRENCH)) {
|
||||
override val altNamePrefix = "Nom alternatif : "
|
||||
override val seriesAuthorSelector = ".infotable tr:contains(Auteur) td:last-child"
|
||||
override val seriesStatusSelector = ".infotable tr:contains(Statut) td:last-child"
|
||||
override val seriesAuthorSelector = ".imptdt:contains(Auteur) i, .fmed b:contains(Auteur)+span"
|
||||
override val seriesStatusSelector = ".imptdt:contains(Statut) i"
|
||||
override fun String?.parseStatus(): Int = when {
|
||||
this == null -> SManga.UNKNOWN
|
||||
this.contains("En Cours", ignoreCase = true) -> SManga.ONGOING
|
||||
|
@ -20,6 +20,11 @@ class SushiScan : MangaThemesia("Sushi-Scan", "https://sushiscan.net", "fr", dat
|
|||
else -> SManga.UNKNOWN
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga =
|
||||
super.mangaDetailsParse(document).apply {
|
||||
status = document.select(seriesStatusSelector).text().parseStatus()
|
||||
}
|
||||
|
||||
// Overriding to fix http -> https when needed
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
val htmlPages = document.select(pageSelector)
|
||||
|
|
|
@ -97,7 +97,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Ozul Scans", "https://ozulscans.com", "ar"),
|
||||
SingleLang("Patatescans", "https://patatescans.com", "fr", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Phantom Scans", "https://phantomscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("PhenixScans", "https://phenixscans.fr", "fr", className = "PhenixScans"),
|
||||
SingleLang("PhenixScans", "https://phenixscans.fr", "fr", className = "PhenixScans", overrideVersionCode = 1),
|
||||
SingleLang("Pi Scans", "https://piscans.in", "id", overrideVersionCode = 1),
|
||||
SingleLang("PMScans", "https://rackusreads.com", "en", overrideVersionCode = 3),
|
||||
SingleLang("Raiki Scan", "https://raikiscan.com", "es"),
|
||||
|
@ -115,7 +115,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Snudae Scans", "https://snudaescans.com", "en", isNsfw = true, className = "BatotoScans", overrideVersionCode = 1),
|
||||
SingleLang("Summer Fansub", "https://smmr.in", "pt-BR", isNsfw = true),
|
||||
SingleLang("Surya Scans", "https://suryascans.com", "en"),
|
||||
SingleLang("Sushi-Scan", "https://sushiscan.net", "fr", className = "SushiScan", overrideVersionCode = 4),
|
||||
SingleLang("Sushi-Scan", "https://sushiscan.net", "fr", className = "SushiScan", overrideVersionCode = 5),
|
||||
SingleLang("Tarot Scans", "https://www.tarotscans.com", "tr"),
|
||||
SingleLang("The Apollo Team", "https://theapollo.team", "en"),
|
||||
SingleLang("Tsundoku Traduções", "https://tsundoku.com.br", "pt-BR", className = "TsundokuTraducoes", overrideVersionCode = 9),
|
||||
|
|
Loading…
Reference in New Issue