janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13.22k stars 1.41k forks source link

[Enhancement] Progressive Loading of Comic Books #804

Open Shihira opened 5 years ago

Shihira commented 5 years ago

I noticed that calibre-web is using kthoom as its comic book reader solution. To note that kthoom is a reader solution specialized for the situation that people doesn't have their server backend and have to serve their entire compressed books on Google Drive or other HTTP services (it's why they have to uncompress the archive in javascript) while calibre-web is on the contrary. Calibre-web is a web service in itself, and on the server side you can list files in the cbz/cbr/cbt archive, seek and extract a certain page in high speed in python.

Thumbnails will probably be unavailable because images are extracted in runtime on the server side, but I would prefer not to view thumbnails if pages were able to load in an instant.

Thank you for your great work.

OzzieIsaacs commented 5 years ago

I tried to implement this a year ago, but I failed, I suffered from memory overflow in JavaScript which I didn‘t understand, so I gave up and throwed it into the corner (if you can say this in English) there are some remains in the code, if you want to try it by yourself,...

Shihira commented 5 years ago

Found the piece of code. I believe the memory overflow is caused by the fact that base64 encoded images are too many, and the browser failed to optimze or cache them as they are programmatically constructed from js string instead of being a standard web resource. What would be a better way to do this is that using ajax interface just for some basic metadata transfer and another URI for resource direct access, without any encodes. With such URI you can even make use of the browser cache and optimize loading with Last-Modified header.

cbartondock commented 4 years ago

Where in the code is this exactly? I might be interested in taking it on.

Edit: nevermind I found it in web.py

OzzieIsaacs commented 3 years ago

920

sunjam commented 2 years ago

Here are the specs for OPDS-pse if it helps: Its goal is to enrich the OPDS feed with information allowing the client to request a specific page of a document without having to download it completely. This extension was designed primarily for comic books, to allow reading them on connected devices without having to wait for the book to be completely downloaded. OPDS-PSE adds new attributes and conventions but does not break compatibility. OPDS-PSE feeds are still valid OPDS feeds.

What is OPDS-pse Github repo tracking current development of OPDS-pse, maintained by developers of multiple Comic Book and Manga selfhosting projects. Originally created by the Ubooquity project