Skip to content

Commit

Permalink
Fixed Kemono MultiSrc (#6375)
Browse files Browse the repository at this point in the history
* Fixed Kemono MultiSrc

* lint
  • Loading branch information
Creepler13 authored Nov 30, 2024
1 parent d9304d4 commit bd32958
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib-multisrc/kemono/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plugins {
id("lib-multisrc")
}

baseVersionCode = 14
baseVersionCode = 15
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ open class Kemono(
GET("$baseUrl/$apiPath${chapter.url}", headers)

override fun pageListParse(response: Response): List<Page> {
val post: KemonoPostDto = response.parseAs()
return post.images.mapIndexed { i, path -> Page(i, imageUrl = baseUrl + path) }
val postData: KemonoPostDtoWrapped = response.parseAs()
return postData.post.images.mapIndexed { i, path -> Page(i, imageUrl = baseUrl + path) }
}

override fun imageRequest(page: Page): Request {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ class KemonoCreatorDto(
}
}

@Serializable
class KemonoPostDtoWrapped(
val post: KemonoPostDto,
)

@Serializable
class KemonoPostDto(
private val id: String,
Expand Down

0 comments on commit bd32958

Please sign in to comment.