Update manga.description (#2210)

MRM - Update Description
This commit is contained in:
happywillow0 2020-02-07 14:25:33 -05:00 committed by GitHub
parent 3e0569c334
commit 26f633993d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MyReadingManga'
pkgNameSuffix = 'all.myreadingmanga'
extClass = '.MyReadingMangaFactory'
extVersionCode = 30
extVersionCode = 31
libVersion = '1.2'
}

View File

@ -172,7 +172,8 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
manga.artist = cleanAuthor(document.select("h1").text())
val glist = document.select(".entry-header p a[href*=genre]").map { it.text() }
manga.genre = glist.joinToString(", ")
manga.description = document.select("h1").text() + "\n" + document.select(".info-class")?.text()
val extendedDescription = document.select(".entry-content p:not(p:containsOwn(|)):not(.chapter-class + p)")?.map { it.text() }?.joinToString("\n")
manga.description = document.select("h1").text() + if (extendedDescription.isNullOrEmpty()) "" else "\n\n$extendedDescription"
manga.status = when (document.select("a[href*=status]")?.first()?.text()) {
"Ongoing" -> SManga.ONGOING
"Completed" -> SManga.COMPLETED