Fix inconsistent json in Nekopost (#10336)
This commit is contained in:
parent
5dd0d2b891
commit
c31fc35000
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Nekopost'
|
||||
pkgNameSuffix = 'th.nekopost'
|
||||
extClass = '.Nekopost'
|
||||
extVersionCode = 6
|
||||
extVersionCode = 7
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -141,9 +141,10 @@ class Nekopost : ParsedHttpSource() {
|
|||
val chapterInfo: RawChapterInfo = json.decodeFromString(responseBody.string())
|
||||
|
||||
chapterInfo.pageItem.map { page ->
|
||||
val fileName = page.fileName ?: page.pageName
|
||||
Page(
|
||||
index = page.pageNo,
|
||||
imageUrl = "$fileHost/collectManga/${chapterInfo.projectId}/${chapterInfo.chapterId}/${page.fileName}",
|
||||
imageUrl = "$fileHost/collectManga/${chapterInfo.projectId}/${chapterInfo.chapterId}/$fileName",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,10 @@ import kotlinx.serialization.Serializable
|
|||
|
||||
@Serializable
|
||||
data class RawPageItem(
|
||||
val fileName: String,
|
||||
val id: Int? = null,
|
||||
// workaround for https://github.com/Kotlin/kotlinx.serialization/pull/1473
|
||||
val fileName: String? = null,
|
||||
val pageName: String? = null,
|
||||
val height: Int,
|
||||
val pageNo: Int,
|
||||
val width: Int
|
||||
|
|
Loading…
Reference in New Issue