From 28265ea618a22dad50f89e8e6598634fa57a8bc0 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Thu, 29 Sep 2022 14:16:54 -0300 Subject: [PATCH] Fix missing description in some titles on RS. (#13628) --- src/pt/reaperscans/build.gradle | 2 +- .../tachiyomi/extension/pt/reaperscans/ReaperScansDto.kt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pt/reaperscans/build.gradle b/src/pt/reaperscans/build.gradle index d0178481d..549ba0ab6 100644 --- a/src/pt/reaperscans/build.gradle +++ b/src/pt/reaperscans/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Reaper Scans' pkgNameSuffix = 'pt.reaperscans' extClass = '.ReaperScans' - extVersionCode = 32 + extVersionCode = 33 } apply from: "$rootDir/common.gradle" diff --git a/src/pt/reaperscans/src/eu/kanade/tachiyomi/extension/pt/reaperscans/ReaperScansDto.kt b/src/pt/reaperscans/src/eu/kanade/tachiyomi/extension/pt/reaperscans/ReaperScansDto.kt index 89d6b73ec..2b50a30a2 100644 --- a/src/pt/reaperscans/src/eu/kanade/tachiyomi/extension/pt/reaperscans/ReaperScansDto.kt +++ b/src/pt/reaperscans/src/eu/kanade/tachiyomi/extension/pt/reaperscans/ReaperScansDto.kt @@ -23,12 +23,14 @@ data class ReaperSeriesDto( ) { fun toSManga(): SManga = SManga.create().apply { + val descriptionBody = this@ReaperSeriesDto.description?.let(Jsoup::parseBodyFragment) + title = this@ReaperSeriesDto.title author = this@ReaperSeriesDto.author?.trim() artist = this@ReaperSeriesDto.studio?.trim() - description = this@ReaperSeriesDto.description - ?.let { Jsoup.parseBodyFragment(it).select("p") } + description = descriptionBody?.select("p") ?.joinToString("\n\n") { it.text() } + ?.ifEmpty { descriptionBody.text().replace("\n", "\n\n") } genre = tags.orEmpty() .sortedBy(ReaperTagDto::name) .joinToString { it.name }