diff --git a/src/all/ehentai/build.gradle b/src/all/ehentai/build.gradle index d6879e2de..0ec182b9a 100644 --- a/src/all/ehentai/build.gradle +++ b/src/all/ehentai/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'E-Hentai' pkgNameSuffix = 'all.ehentai' extClass = '.EHFactory' - extVersionCode = 18 + extVersionCode = 19 isNsfw = true } diff --git a/src/all/ehentai/src/eu/kanade/tachiyomi/extension/all/ehentai/EHentai.kt b/src/all/ehentai/src/eu/kanade/tachiyomi/extension/all/ehentai/EHentai.kt index 3770d6b44..ad41256d1 100644 --- a/src/all/ehentai/src/eu/kanade/tachiyomi/extension/all/ehentai/EHentai.kt +++ b/src/all/ehentai/src/eu/kanade/tachiyomi/extension/all/ehentai/EHentai.kt @@ -171,6 +171,7 @@ abstract class EHentai( if (uri.toString().contains("f_spf") || uri.toString().contains("f_spt")) { if (page > 1) uri.appendQueryParameter("from", lastMangaId) } + return exGet(uri.toString(), page) } @@ -181,8 +182,10 @@ abstract class EHentai( override fun latestUpdatesParse(response: Response) = genericMangaParse(response) private fun exGet(url: String, page: Int? = null, additionalHeaders: Headers? = null, cache: Boolean = true): Request { + //pages no longer exist, if app attempts to go to the first page after a request, do not include the page append + val pageIndex = if (page == 1) null else page return GET( - page?.let { + pageIndex?.let { addParam(url, "next", lastMangaId) } ?: url, additionalHeaders?.let { header -> @@ -194,6 +197,7 @@ abstract class EHentai( } headers.build() } ?: headers + ).let { if (!cache) { it.newBuilder().cacheControl(CacheControl.FORCE_NETWORK).build()