From 262a20b7a89cc17cc5324fb5d8615d5b50950259 Mon Sep 17 00:00:00 2001 From: rzmeu <55561290+rzmeu@users.noreply.github.com> Date: Sun, 24 Oct 2021 20:38:30 +0300 Subject: [PATCH] Update SimplyHentai extension to display all images, currently only first 12 images are shown. (#9607) --- src/all/simplyhentai/build.gradle | 2 +- .../tachiyomi/extension/all/simplyhentai/SimplyHentai.kt | 3 ++- .../extension/all/simplyhentai/SimplyHentaiAPI.kt | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/all/simplyhentai/build.gradle b/src/all/simplyhentai/build.gradle index 77fd6c8b0..fe9089150 100644 --- a/src/all/simplyhentai/build.gradle +++ b/src/all/simplyhentai/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Simply Hentai' pkgNameSuffix = 'all.simplyhentai' extClass = '.SimplyHentaiFactory' - extVersionCode = 5 + extVersionCode = 6 isNsfw = true } diff --git a/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentai.kt b/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentai.kt index 7ab0dc79b..5ce3110ff 100644 --- a/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentai.kt +++ b/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentai.kt @@ -178,13 +178,14 @@ open class SimplyHentai(override val lang: String) : ConfigurableSource, HttpSou override fun pageListRequest(chapter: SChapter) = Uri.parse("$apiUrl/album").buildUpon().run { appendEncodedPath(chapter.url.split('/')[2]) + appendEncodedPath("/pages") appendQueryParameter("si", "0") appendQueryParameter("locale", lang) GET(build().toString(), headers) } override fun pageListParse(response: Response) = - response.decode().data.images.map { + response.decode().data.pages.map { Page(it.page_num, "", it.sizes.full) } diff --git a/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentaiAPI.kt b/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentaiAPI.kt index 036c9bd14..ce9cb5f35 100644 --- a/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentaiAPI.kt +++ b/src/all/simplyhentai/src/eu/kanade/tachiyomi/extension/all/simplyhentai/SimplyHentaiAPI.kt @@ -49,3 +49,11 @@ data class SHData( ) { val path by lazy { "/${series.slug}/$slug" } } + +@Serializable +data class SHAlbumPages(val data: SHPagesData) + +@Serializable +data class SHPagesData( + val pages: List +)