feat: full chapter file download - #17
Conversation
|
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 |
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.