From e3933d6f22dabc6c1ab5c9d1fa2e3023e32e5295 Mon Sep 17 00:00:00 2001 From: Creepler13 Date: Sat, 30 Nov 2024 18:58:23 +0100 Subject: [PATCH] Fixed Kemono MultiSrc (#6375) * Fixed Kemono MultiSrc * lint --- lib-multisrc/kemono/build.gradle.kts | 2 +- .../kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt | 4 ++-- .../src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib-multisrc/kemono/build.gradle.kts b/lib-multisrc/kemono/build.gradle.kts index bbea4c992..aea7b2d34 100644 --- a/lib-multisrc/kemono/build.gradle.kts +++ b/lib-multisrc/kemono/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 14 +baseVersionCode = 15 diff --git a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt index fcc8b0577..85a986dd0 100644 --- a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt +++ b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt @@ -233,8 +233,8 @@ open class Kemono( GET("$baseUrl/$apiPath${chapter.url}", headers) override fun pageListParse(response: Response): List { - 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 { diff --git a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt index 90116f5a2..7df45a075 100644 --- a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt +++ b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt @@ -51,6 +51,11 @@ class KemonoCreatorDto( } } +@Serializable +class KemonoPostDtoWrapped( + val post: KemonoPostDto, +) + @Serializable class KemonoPostDto( private val id: String,