Skip to content

feat: full chapter file download - #17

Open
paul-arthurthiery wants to merge 2 commits into
mihonapp:mainfrom
paul-arthurthiery:full-chapter-download
Open

feat: full chapter file download#17
paul-arthurthiery wants to merge 2 commits into
mihonapp:mainfrom
paul-arthurthiery:full-chapter-download

Conversation

@paul-arthurthiery

@paul-arthurthiery paul-arthurthiery commented Aug 22, 2025

Copy link
Copy Markdown

This PR, alongside its sister mihon PR, aims to allow extensions to use an alternate download strategy (dubbed full chapter download) where whole cbz files are downloaded instead of the traditional page-by-page download.

Here, I added stubs for the full chapter download API.

This feature is non-breaking, as it needs to be enabled via user preference.

I have tested this feature with various files hosted on my Suwayomi instance by running a local build of the app and the extension on my device.

Again, as this is my first attempt at contribution, feel free to point out any issue with it (be it code style, code architecture, or others). Feedback is greatly appreciated.

@krysanify

Copy link
Copy Markdown

This is cool, I'm not a contributor here but just curious to know what if the source only provides cbz for some chapters, not all? Is the extension responsible for falling back to the usual strategy or would it throw exception and app is the one that need to handle it?

Comment thread library/src/main/java/eu/kanade/tachiyomi/source/ConfigurableSource.kt Outdated
Comment thread library/src/main/java/eu/kanade/tachiyomi/source/Source.kt Outdated
Comment thread library/src/main/java/eu/kanade/tachiyomi/source/Source.kt Outdated
Comment thread library/src/main/java/eu/kanade/tachiyomi/source/Source.kt Outdated
@paul-arthurthiery

paul-arthurthiery commented Aug 27, 2025

Copy link
Copy Markdown
Author

This is cool, I'm not a contributor here but just curious to know what if the source only provides cbz for some chapters, not all? Is the extension responsible for falling back to the usual strategy or would it throw exception and app is the one that need to handle it?

This isn't something I thought of at all to be honest. In hindsight, it would make sense for extensions to implement their own fallback logic.

@stevenyomi maybe a preference isn't needed at all actually, maybe the extension should have its own internal logic to know when to download via fullChapter vs page-by-page (without relying on a user-enabled preference) 🤔

import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.Response

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

no usage here

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.

5 participants