Fix the closed error in Spanish YugenMangas. (#13910)

This commit is contained in:
Alessandro Jean 2022-10-18 16:21:47 -03:00 committed by GitHub
parent d52dc85288
commit a26c4ce824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@ abstract class HeanCms(
return MangasPage(mangaList, result.meta?.hasNextPage ?: false)
}
val mangaList = response.parseAs<List<HeanCmsSeriesDto>>()
val mangaList = json.parseAs<List<HeanCmsSeriesDto>>()
.map { it.toSManga(apiUrl, coverPath) }
fetchAllTitles()
@ -153,7 +153,7 @@ abstract class HeanCms(
return MangasPage(mangaList, result.meta?.hasNextPage ?: false)
}
var mangaList = response.parseAs<List<HeanCmsSeriesDto>>()
var mangaList = json.parseAs<List<HeanCmsSeriesDto>>()
.map { it.toSManga(apiUrl, coverPath) }
if (query.isNotBlank()) {
@ -324,7 +324,7 @@ abstract class HeanCms(
}
private inline fun <reified T> Response.parseAs(): T = use {
json.decodeFromString(it.body?.string().orEmpty())
it.body?.string().orEmpty().parseAs()
}
private inline fun <reified T> String.parseAs(): T = json.decodeFromString(this)

View File

@ -9,7 +9,7 @@ class HeanCmsGenerator : ThemeSourceGenerator {
override val themeClass = "HeanCms"
override val baseVersionCode: Int = 2
override val baseVersionCode: Int = 3
override val sources = listOf(
SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 35),