ManhwaZ: Use ignore case when comparing in status (#10562)
ManhwaZ: Use ignore case parsing when comparing in status
This commit is contained in:
parent
128c4a4194
commit
ba2f0c6271
@ -2,7 +2,7 @@ plugins {
|
|||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 2
|
baseVersionCode = 3
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":lib:i18n"))
|
api(project(":lib:i18n"))
|
||||||
|
@ -118,7 +118,6 @@ abstract class ManhwaZ(
|
|||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
val statusText = document.selectFirst("div.summary-heading:contains($mangaDetailsStatusHeading) + div.summary-content")
|
val statusText = document.selectFirst("div.summary-heading:contains($mangaDetailsStatusHeading) + div.summary-content")
|
||||||
?.text()
|
?.text()
|
||||||
?.lowercase()
|
|
||||||
?: ""
|
?: ""
|
||||||
|
|
||||||
title = document.selectFirst("div.post-title h1")!!.text()
|
title = document.selectFirst("div.post-title h1")!!.text()
|
||||||
@ -126,8 +125,8 @@ abstract class ManhwaZ(
|
|||||||
description = document.selectFirst("div.summary__content")?.text()
|
description = document.selectFirst("div.summary__content")?.text()
|
||||||
genre = document.select("div.genres-content a[rel=tag]").joinToString { it.text() }
|
genre = document.select("div.genres-content a[rel=tag]").joinToString { it.text() }
|
||||||
status = when {
|
status = when {
|
||||||
ongoingStatusList.contains(statusText) -> SManga.ONGOING
|
ongoingStatusList.any { it.contains(statusText, ignoreCase = true) } -> SManga.ONGOING
|
||||||
completedStatusList.contains(statusText) -> SManga.COMPLETED
|
completedStatusList.any { it.contains(statusText, ignoreCase = true) } -> SManga.COMPLETED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
thumbnail_url = document.selectFirst("div.summary_image img")?.imgAttr()
|
thumbnail_url = document.selectFirst("div.summary_image img")?.imgAttr()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user