GravureBlogger: fix incomplete results due to incorrect totalResults field (#1657)

This commit is contained in:
AwkwardPeak7 2024-03-03 01:37:18 +05:00 committed by GitHub
parent d4244eec23
commit b498b0dad6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 5 deletions

View File

@ -2,4 +2,4 @@ plugins {
id("lib-multisrc") id("lib-multisrc")
} }
baseVersionCode = 2 baseVersionCode = 3

View File

@ -10,9 +10,6 @@ class BloggerDto(
@Serializable @Serializable
class BloggerFeedDto( class BloggerFeedDto(
@SerialName("openSearch\$totalResults") val totalResults: BloggerTextDto,
@SerialName("openSearch\$startIndex") val startIndex: BloggerTextDto,
@SerialName("openSearch\$itemsPerPage") val itemsPerPage: BloggerTextDto,
val category: List<BloggerCategoryDto> = emptyList(), val category: List<BloggerCategoryDto> = emptyList(),
val entry: List<BloggerFeedEntryDto> = emptyList(), val entry: List<BloggerFeedEntryDto> = emptyList(),
) )

View File

@ -65,7 +65,7 @@ abstract class GravureBlogger(
initialized = true 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) return MangasPage(manga, hasNextPage)
} }