Update SimplyHentai extension to display all images, currently only first 12 images are shown. (#9607)
This commit is contained in:
parent
9f236a29f1
commit
262a20b7a8
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Simply Hentai'
|
||||
pkgNameSuffix = 'all.simplyhentai'
|
||||
extClass = '.SimplyHentaiFactory'
|
||||
extVersionCode = 5
|
||||
extVersionCode = 6
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -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<SHAlbum>().data.images.map {
|
||||
response.decode<SHAlbumPages>().data.pages.map {
|
||||
Page(it.page_num, "", it.sizes.full)
|
||||
}
|
||||
|
||||
|
|
|
@ -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<SHImage>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue