Fix no chapters found error not showing in MangaSar. (#8781)

This commit is contained in:
Alessandro Jean 2021-08-24 07:41:50 -03:00 committed by GitHub
parent 5e25906ae3
commit 7f232185fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -172,10 +172,10 @@ abstract class MangaSar(
.map(::chapterFromObject)
.toMutableList()
var page = result.page + 1
var page = result.page!! + 1
val lastPage = result.totalPages
while (++page <= lastPage) {
while (++page <= lastPage!!) {
val nextPageRequest = chapterListPaginatedRequest(mangaUrl, page)
result = client.newCall(nextPageRequest).execute().let {
json.decodeFromString(it.body!!.string())

View File

@ -28,8 +28,8 @@ data class MangaSarTitleDto(
@Serializable
data class MangaSarPaginatedChaptersDto(
val chapters: List<MangaSarChapterDto>? = emptyList(),
@SerialName("pagina") val page: Int,
@SerialName("total_pags") val totalPages: Int
@SerialName("pagina") val page: Int? = -1,
@SerialName("total_pags") val totalPages: Int? = -1
)
@Serializable

View File

@ -9,7 +9,7 @@ class MangaSarGenerator : ThemeSourceGenerator {
override val themeClass = "MangaSar"
override val baseVersionCode: Int = 4
override val baseVersionCode: Int = 5
override val sources = listOf(
SingleLang("MangaTube", "https://mangatube.site", "pt-BR"),