Fixed Title Error, added status(on_hiatus) (#14121)
* Fixed Title display for BL and GL * Fixed Discrepancies in Some Title Parsing * Fixed status for on Hiatus titles. Co-authored-by: Abhay Singh <sinnghabhay80@gmail.com>
This commit is contained in:
parent
e12605507a
commit
45b5e362c7
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Tapas'
|
extName = 'Tapas'
|
||||||
pkgNameSuffix = 'en.tapastic'
|
pkgNameSuffix = 'en.tapastic'
|
||||||
extClass = '.Tapastic'
|
extClass = '.Tapastic'
|
||||||
extVersionCode = 18
|
extVersionCode = 19
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,18 +182,18 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
|
||||||
val genreArray = arrayOf(
|
val genreArray = arrayOf(
|
||||||
"Any",
|
"Any",
|
||||||
"Action",
|
"Action",
|
||||||
"Boys Love",
|
"BL",
|
||||||
"Comedy",
|
"Comedy",
|
||||||
"Drama",
|
"Drama",
|
||||||
"Fantasy",
|
"Fantasy",
|
||||||
"Girls Love",
|
"GL",
|
||||||
"Gaming",
|
"Gaming",
|
||||||
"Horror",
|
"Horror",
|
||||||
"LGBTQ+",
|
"LGBTQ+",
|
||||||
"Mystery",
|
"Mystery",
|
||||||
"Romance",
|
"Romance",
|
||||||
"Science Fiction",
|
"Science fiction",
|
||||||
"Slice of Life"
|
"Slice of life"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,6 +281,11 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
|
||||||
artist = author
|
artist = author
|
||||||
status = document.select("div.schedule span.schedule-label").text().toStatus()
|
status = document.select("div.schedule span.schedule-label").text().toStatus()
|
||||||
val announcementName: String? = document.select("div.series-announcement div.announcement__text p").text()
|
val announcementName: String? = document.select("div.series-announcement div.announcement__text p").text()
|
||||||
|
|
||||||
|
if (announcementName!!.contains("Hiatus")) {
|
||||||
|
status = SManga.ON_HIATUS
|
||||||
|
description = document.select("div.row-body span.description__body").text()
|
||||||
|
} else {
|
||||||
val announcementText: String? = document.select("div.announcement__body p.js-announcement-text").text()
|
val announcementText: String? = document.select("div.announcement__body p.js-announcement-text").text()
|
||||||
description = if (announcementName.isNullOrEmpty() || announcementText.isNullOrEmpty()) {
|
description = if (announcementName.isNullOrEmpty() || announcementText.isNullOrEmpty()) {
|
||||||
document.select("div.row-body span.description__body").text()
|
document.select("div.row-body span.description__body").text()
|
||||||
|
@ -288,6 +293,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
|
||||||
announcementName.plus("\n") + announcementText.plus("\n\n") + document.select("div.row-body span.description__body").text()
|
announcementName.plus("\n") + announcementText.plus("\n\n") + document.select("div.row-body span.description__body").text()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun String.toStatus() = when {
|
private fun String.toStatus() = when {
|
||||||
this.contains("Updates", ignoreCase = true) -> SManga.ONGOING
|
this.contains("Updates", ignoreCase = true) -> SManga.ONGOING
|
||||||
|
|
Loading…
Reference in New Issue