From b498b0dad6692b036e3c2334dbb26120431b6ea4 Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Sun, 3 Mar 2024 01:37:18 +0500 Subject: [PATCH] GravureBlogger: fix incomplete results due to incorrect totalResults field (#1657) --- lib-multisrc/gravureblogger/build.gradle.kts | 2 +- .../eu/kanade/tachiyomi/multisrc/gravureblogger/BloggerDto.kt | 3 --- .../kanade/tachiyomi/multisrc/gravureblogger/GravureBlogger.kt | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib-multisrc/gravureblogger/build.gradle.kts b/lib-multisrc/gravureblogger/build.gradle.kts index 9dce2478c..e2f11e9c1 100644 --- a/lib-multisrc/gravureblogger/build.gradle.kts +++ b/lib-multisrc/gravureblogger/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 2 +baseVersionCode = 3 diff --git a/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/BloggerDto.kt b/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/BloggerDto.kt index a6b530cec..3b5bfcafb 100644 --- a/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/BloggerDto.kt +++ b/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/BloggerDto.kt @@ -10,9 +10,6 @@ class BloggerDto( @Serializable class BloggerFeedDto( - @SerialName("openSearch\$totalResults") val totalResults: BloggerTextDto, - @SerialName("openSearch\$startIndex") val startIndex: BloggerTextDto, - @SerialName("openSearch\$itemsPerPage") val itemsPerPage: BloggerTextDto, val category: List = emptyList(), val entry: List = emptyList(), ) diff --git a/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/GravureBlogger.kt b/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/GravureBlogger.kt index 773cbd91e..ee0100ae0 100644 --- a/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/GravureBlogger.kt +++ b/lib-multisrc/gravureblogger/src/eu/kanade/tachiyomi/multisrc/gravureblogger/GravureBlogger.kt @@ -65,7 +65,7 @@ abstract class GravureBlogger( initialized = true } } - val hasNextPage = (data.feed.startIndex.t.toInt() + data.feed.itemsPerPage.t.toInt()) <= data.feed.totalResults.t.toInt() + val hasNextPage = data.feed.entry.size == MAX_RESULTS return MangasPage(manga, hasNextPage) }