Fixed Kemono MultiSrc (#6375)

* Fixed Kemono MultiSrc

* lint
This commit is contained in:
Creepler13 2024-11-30 18:58:23 +01:00 committed by Draff
parent f9566c55e4
commit e3933d6f22
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
3 changed files with 8 additions and 3 deletions

View File

@ -2,4 +2,4 @@ plugins {
id("lib-multisrc") id("lib-multisrc")
} }
baseVersionCode = 14 baseVersionCode = 15

View File

@ -233,8 +233,8 @@ open class Kemono(
GET("$baseUrl/$apiPath${chapter.url}", headers) GET("$baseUrl/$apiPath${chapter.url}", headers)
override fun pageListParse(response: Response): List<Page> { override fun pageListParse(response: Response): List<Page> {
val post: KemonoPostDto = response.parseAs() val postData: KemonoPostDtoWrapped = response.parseAs()
return post.images.mapIndexed { i, path -> Page(i, imageUrl = baseUrl + path) } return postData.post.images.mapIndexed { i, path -> Page(i, imageUrl = baseUrl + path) }
} }
override fun imageRequest(page: Page): Request { override fun imageRequest(page: Page): Request {

View File

@ -51,6 +51,11 @@ class KemonoCreatorDto(
} }
} }
@Serializable
class KemonoPostDtoWrapped(
val post: KemonoPostDto,
)
@Serializable @Serializable
class KemonoPostDto( class KemonoPostDto(
private val id: String, private val id: String,