Skip to content

Buondua: Upgrade to 1.6 & add preference for options to split pages or combine all pages into 1 gallery#17654

Merged
AwkwardPeak7 merged 5 commits into
keiyoushi:mainfrom
cuong-tran:buondua
Jul 18, 2026
Merged

Buondua: Upgrade to 1.6 & add preference for options to split pages or combine all pages into 1 gallery#17654
AwkwardPeak7 merged 5 commits into
keiyoushi:mainfrom
cuong-tran:buondua

Conversation

@cuong-tran

Copy link
Copy Markdown
Contributor

Checklist:

  • Updated versionCode value in build.gradle.kts
  • Updated baseVersionCode in build.gradle.kts (if updated multisrc theme code)
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Set the contentWarning configuration in build.gradle.kts appropriately
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension
  • This PR is AI-assisted, I have reviewed the changes manually and confirmed they are not slop

@AwkwardPeak7 AwkwardPeak7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider migrating to KeiSource too

@cuong-tran
cuong-tran marked this pull request as draft July 17, 2026 10:55
@cuong-tran
cuong-tran marked this pull request as ready for review July 17, 2026 17:01
@cuong-tran cuong-tran changed the title Buondua: Add preference for options to split pages or combine all pages into 1 gallery Buondua: Upgrade to 1.6 & add preference for options to split pages or combine all pages into 1 gallery Jul 17, 2026
Comment thread src/all/buondua/src/eu/kanade/tachiyomi/extension/all/buondua/BuonDua.kt Outdated
Comment on lines 214 to 229
return (1..maxPage).parallelCatchingFlatMap { page ->
val doc = when (page) {
1 -> document
else -> {
val pageUrl = basePageUrl.toHttpUrl().newBuilder()
.setQueryParameter("page", page.toString())
.build()
client.get(pageUrl).asJsoup()
}
}
doc.select(pageListSelector).map { imgEl ->
imgEl.absUrl("src")
}
}.mapIndexed { index, url ->
Page(index, imageUrl = url)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of fetching all pages together like this, set Page.url with the html page link and get imgurl in getImageUrl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't get it. The page(s) which are being fetch in parallel are html page, each of them have a dozen of images (Page) inside.

Original code was put each of page into a chapter, then when chapter is loaded, it will fetch page.
New code is fetching all page(s) to find the list of imgurl and put them all together in 1 merged Gallery.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes. In that case, you don't need to silently swallow exceptions and miss pages. Inline the async code without runcatching

@AwkwardPeak7
AwkwardPeak7 merged commit c04e82b into keiyoushi:main Jul 18, 2026
2 checks passed
@cuong-tran
cuong-tran deleted the buondua branch July 18, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants