Skip to content

Optional BookOrbit KOReader reading-stats sync#9

Merged
thehijacker merged 2 commits into
thehijacker:prfrom
juliefuller:pr/bookorbit-stats
Jun 10, 2026
Merged

Optional BookOrbit KOReader reading-stats sync#9
thehijacker merged 2 commits into
thehijacker:prfrom
juliefuller:pr/bookorbit-stats

Conversation

@juliefuller

@juliefuller juliefuller commented Jun 9, 2026

Copy link
Copy Markdown

Summary

  • Settings toggle: Sync reading stats to BookOrbit KOReader Stats (kosync_stats_enabled)
  • Status bar synced ago display (last successful KOReader push)
  • Codexa proxies POST /api/kosync/remote/stats{kosync_url}/stats
  • Graceful degradation: if the server returns 404 or has no stats endpoint, Codexa skips silently (no errors in the UI)

BookOrbit dependency (not in main trunk yet)

This feature is optional and only does anything when your KOReader sync server is BookOrbit with stats ingest — that endpoint is not in the published ghcr.io/bookorbit/bookorbit:latest image (v1.9.0) today.

It lives on BookOrbit PR #123 / issue #28 (POST /api/v1/koreader/stats, tables koreader_book_stats + koreader_reading_sessions).

Until that merges and ships in a BookOrbit release, users need a build from that branch (or equivalent). Tested against a local image built from the PR branch; standard KOReader sync (/api/v1/koreader) still works without stats — only the stats toggle stays inert / skips push.

Codexa KOReader URL (unchanged): e.g. http://your-bookorbit:8087/api/v1/koreader — Codexa appends /stats for reading-time payloads.

Merge order

Merge these Codexa PRs first: #6#7#10 (reader UX) → #11 (KOReader sync). This PR adds one commit on top of #11.

Reading stats push is now opt-in via KOReader Sync settings and fails silently when the remote server lacks a stats endpoint; the reader can show a live "Synced Ns ago" overlay slot.

Co-authored-by: Cursor <cursoragent@cursor.com>
@juliefuller juliefuller force-pushed the pr/bookorbit-stats branch from c67c246 to 5601665 Compare June 9, 2026 17:13
@juliefuller

Copy link
Copy Markdown
Author

Updated branch: now stacks on the KOReader sync PR (#11). Merge order: #6#7#10#11#9.

@thehijacker thehijacker changed the base branch from main to pr June 10, 2026 05:09
@thehijacker thehijacker merged commit 9488992 into thehijacker:pr Jun 10, 2026
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