Fix missing description in some titles on RS. (#13628)

This commit is contained in:
Alessandro Jean 2022-09-29 14:16:54 -03:00 committed by GitHub
parent 31f933ff08
commit 28265ea618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Reaper Scans'
pkgNameSuffix = 'pt.reaperscans'
extClass = '.ReaperScans'
extVersionCode = 32
extVersionCode = 33
}
apply from: "$rootDir/common.gradle"

View File

@ -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 }