wrolpi/app/public
lrnselfreliance 3c362799b5
Resume EPUBs and comic books where the reader left off (#798)
* Resume EPUBs and comic books where the reader left off

The EPUB viewer (epub.html) accepts `?cfi=` and posts its location and
progress to the page that embeds it on every page turn.  Progress comes from
the chapter and the page within it, rather than book.locations.generate(),
which stalls a Raspberry Pi on a large book.  A search result's `loc` still
wins over the saved position.

The comic viewer opens at the saved page and saves each page shown.

Both resume on the doc page and in the file preview.  The resume point is
decided once per opened file, so saves made while reading do not change the
EPUB viewer's URL and reload it.  The doc page tracks only the FileGroup's
primary file; another format beside it is not tracked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* EPUB/comic progress: never save a place the server would discard

The server treats a position at the start (the cover, under 1%) as not
started, and replaces the saved place with progress 0.  Both viewers
reported the place they opened on, so opening a finished book un-finished
it, and peeking at the cover erased the reader's page.

- The comic viewer does not save the page it opens on, nor the cover; a
  peek at the cover keeps the last page saved.
- The EPUB viewer posts nothing at the start of the book.
- Progress before the end is kept between 1% and 94% (resumableProgress), so
  early pages of a long book and the last pages before the end keep their
  position.  Only the last page (comics) or the end (EPUB) is finished.
- Non-finite EPUB progress is ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:19:51 -06:00
..
data Add a Solar calculator (#778) 2026-10-04 18:36:45 -06:00
epub Resume EPUBs and comic books where the reader left off (#798) 2026-10-08 18:19:51 -06:00
android-chrome-192x192.png Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
android-chrome-512x512.png Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
apple-touch-icon.png Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
favicon-16x16.png Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
favicon-32x32.png Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
favicon-blue.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-brown.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-green.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-grey.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-olive.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-orange.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-pink.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-purple.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-red.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-teal.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-violet.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon-yellow.svg Changing favicon color when navbar color changes. 2026-02-04 12:28:55 -07:00
favicon.ico Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
icon-transparent.png Fixing rebrand binary hook (wrong cwd) and using the new transparent logo. 2026-05-25 20:16:02 -06:00
icon.svg Fixing bug where file search would issue twice on load. 2023-04-09 14:34:33 -06:00
index.html ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-08 18:04:00 -06:00
logo192.png Fixing JS warnings. 2022-09-23 11:25:55 -06:00
logo512.png Fixing JS warnings. 2022-09-23 11:25:55 -06:00
manifest.json Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
mstile-150x150.png Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
one-time-pad-cheat-sheet.pdf A new start 2021-11-01 16:43:09 -06:00
robots.txt A new start 2021-11-01 16:43:09 -06:00