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:
sinnghabhay80 2022-11-04 16:31:00 +05:30 committed by GitHub
parent e12605507a
commit 45b5e362c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Tapas'
pkgNameSuffix = 'en.tapastic'
extClass = '.Tapastic'
extVersionCode = 18
extVersionCode = 19
isNsfw = true
}

View File

@ -182,18 +182,18 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
val genreArray = arrayOf(
"Any",
"Action",
"Boys Love",
"BL",
"Comedy",
"Drama",
"Fantasy",
"Girls Love",
"GL",
"Gaming",
"Horror",
"LGBTQ+",
"Mystery",
"Romance",
"Science Fiction",
"Slice of Life"
"Science fiction",
"Slice of life"
)
}
}
@ -281,11 +281,17 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
artist = author
status = document.select("div.schedule span.schedule-label").text().toStatus()
val announcementName: String? = document.select("div.series-announcement div.announcement__text p").text()
val announcementText: String? = document.select("div.announcement__body p.js-announcement-text").text()
description = if (announcementName.isNullOrEmpty() || announcementText.isNullOrEmpty()) {
document.select("div.row-body span.description__body").text()
if (announcementName!!.contains("Hiatus")) {
status = SManga.ON_HIATUS
description = document.select("div.row-body span.description__body").text()
} else {
announcementName.plus("\n") + announcementText.plus("\n\n") + document.select("div.row-body span.description__body").text()
val announcementText: String? = document.select("div.announcement__body p.js-announcement-text").text()
description = if (announcementName.isNullOrEmpty() || announcementText.isNullOrEmpty()) {
document.select("div.row-body span.description__body").text()
} else {
announcementName.plus("\n") + announcementText.plus("\n\n") + document.select("div.row-body span.description__body").text()
}
}
}