Fix missing description in some titles on RS. (#13628)
This commit is contained in:
parent
31f933ff08
commit
28265ea618
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Reaper Scans'
|
extName = 'Reaper Scans'
|
||||||
pkgNameSuffix = 'pt.reaperscans'
|
pkgNameSuffix = 'pt.reaperscans'
|
||||||
extClass = '.ReaperScans'
|
extClass = '.ReaperScans'
|
||||||
extVersionCode = 32
|
extVersionCode = 33
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -23,12 +23,14 @@ data class ReaperSeriesDto(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
fun toSManga(): SManga = SManga.create().apply {
|
fun toSManga(): SManga = SManga.create().apply {
|
||||||
|
val descriptionBody = this@ReaperSeriesDto.description?.let(Jsoup::parseBodyFragment)
|
||||||
|
|
||||||
title = this@ReaperSeriesDto.title
|
title = this@ReaperSeriesDto.title
|
||||||
author = this@ReaperSeriesDto.author?.trim()
|
author = this@ReaperSeriesDto.author?.trim()
|
||||||
artist = this@ReaperSeriesDto.studio?.trim()
|
artist = this@ReaperSeriesDto.studio?.trim()
|
||||||
description = this@ReaperSeriesDto.description
|
description = descriptionBody?.select("p")
|
||||||
?.let { Jsoup.parseBodyFragment(it).select("p") }
|
|
||||||
?.joinToString("\n\n") { it.text() }
|
?.joinToString("\n\n") { it.text() }
|
||||||
|
?.ifEmpty { descriptionBody.text().replace("\n", "\n\n") }
|
||||||
genre = tags.orEmpty()
|
genre = tags.orEmpty()
|
||||||
.sortedBy(ReaperTagDto::name)
|
.sortedBy(ReaperTagDto::name)
|
||||||
.joinToString { it.name }
|
.joinToString { it.name }
|
||||||
|
|
Loading…
Reference in New Issue