381 Commits

Author SHA1 Message Date
cottongin
aa87b3f294
docs: add font generation commands to builtin font headers (#547)
Cherry-picked from upstream PR #547
2026-01-27 07:31:06 -05:00
cottongin
7a4af97ae8
docs: Update README with supported languages for EPUB (#530)
Cherry-picked from upstream PR #530
2026-01-27 07:30:53 -05:00
cottongin
703d95523b
fix: Add .vs folder to .gitignore (#466)
Cherry-picked from upstream PR #466
2026-01-27 07:30:38 -05:00
cottongin
1a38fd96af
image tweaks 2026-01-27 07:11:18 -05:00
cottongin
5f4fa3bebe
checkpoint 1 2026-01-26 19:48:21 -05:00
cottongin
94a7c2c0b8
starting point for -ef fork 2026-01-26 18:54:15 -05:00
Martin Brook
41eabba0d4 style: apply clang-format-21 formatting 2026-01-26 22:16:41 +00:00
cottongin
f739869519
Add MD5 hash API for companion app sync and improve upload reliability
- Add /api/hash endpoint to compute and cache MD5 hashes on demand
- Extend /api/files response with md5 field for EPUBs (null if not cached)
- Compute and cache MD5 automatically after EPUB uploads
- Add flush() before close() in WebSocket and HTTP upload handlers
- New Md5Utils module using ESP32's mbedtls for chunked hash computation

The MD5 hashes enable the companion app to detect file changes without
downloading content. Hashes are cached in each book's .crosspoint cache
directory and invalidated when file size changes.
2026-01-26 16:13:27 -05:00
Martin Brook
99702a342c feat: epub add png jpeg support 2026-01-26 19:09:19 +00:00
cottongin
a707cc6da2
debug mode added for memory testing 2026-01-26 13:56:36 -05:00
cottongin
d8bee1d21f
new debugging monitor 2026-01-26 13:13:44 -05:00
cottongin
2f7312e6a0
Merge branch 'merge-438' into merge-438-progress-bar-1
Merges progress bar status bar feature from merge-438:
- Added FULL_WITH_PROGRESS_BAR and ONLY_PROGRESS_BAR status bar modes
- Added drawBookProgressBar() to ScreenComponents

Preserves features from current branch:
- Content offset tracking for position restoration (EPUB_PROGRESS_VERSION)
- drawBatteryLarge() function
- Sleep Screen Cover Mode "Actual" option
2026-01-26 10:42:03 -05:00
cottongin
d02e2e5b5e
further webserver idle screen tweaks 2026-01-26 03:38:49 -05:00
cottongin
2c24ee3f81
Add reading lists feature with pinning and management
Adds full support for book lists managed by the Companion App:
- New /list API endpoints (GET/POST) for uploading, retrieving, and deleting lists
- BookListStore for binary serialization of lists to /.lists/ directory
- ListViewActivity for viewing list contents with book thumbnails
- Reading Lists tab in My Library with pin/unpin and delete actions
- Pinnable list shortcut on home screen (split button layout)
- Automatic cleanup of pinned status when lists are deleted
2026-01-26 02:08:59 -05:00
cottongin
cda8a5ec6d
web server tweaks 2026-01-25 21:22:49 -05:00
Alex Faria
6e0cc4cf46 fix: Use show battery percentage on TxtReaderActivity 2026-01-25 22:41:34 +00:00
Alex Faria
4d74cd795a feat: Add status bar option "Progress Bar" 2026-01-25 22:37:39 +00:00
Alex Faria
08adc91bbe feat: Add status bar option "Progress Bar" 2026-01-25 22:07:48 +00:00
Alex Faria
5996936c2e Merge branch 'master' into alexfaria/status-progress-bar 2026-01-25 21:55:20 +00:00
cottongin
af58eb1987
mDNS tweaks 2026-01-25 16:07:00 -05:00
cottongin
e9e9ef68da
adds initial support for companion app 2026-01-25 13:43:04 -05:00
cottongin
91c8cc67ce
granular position tracking 2026-01-25 00:24:54 -05:00
cottongin
fedc14bcb4
fix web server OOM 2026-01-24 23:08:35 -05:00
cottongin
2b2bc95cf2
fixed 2026-01-24 21:10:08 -05:00
cottongin
6bedc4ffec
improved sleep screen performance and cover art 2026-01-24 20:48:13 -05:00
cottongin
ecff988a29
add basic file management to web server 2026-01-24 13:05:01 -05:00
cottongin
c87a06edb8
roll home screen performance tweaks to library screens 2026-01-24 04:14:19 -05:00
cottongin
7fce5b347d
home screen performance fix 2026-01-24 03:59:08 -05:00
cottongin
2f21f55512
sleep screen filled with cover image's perimeter dominant color prior to being drawn 2026-01-24 03:29:34 -05:00
cottongin
1e20d30875
yep it works 2026-01-24 02:44:11 -05:00
cottongin
5c3828efe8
nice 2026-01-24 02:01:53 -05:00
cottongin
2952d7554c
feat: merge PR #511 - display epub metadata on Recents
Integrates upstream PR #511 changes while preserving local delete/archive
functionality. Key changes:

- Add RecentBook struct with path, title, author fields
- Update RecentBooksStore to store and serialize metadata
- Implement version migration for existing recent.bin files
- Update MyLibraryActivity to display two-line items (title + author)
- Update EpubReaderActivity and XtcReaderActivity to pass metadata

Maintains backwards compatibility with delete/archive feature from
local commit d5a9873.
2026-01-23 22:38:59 -05:00
pablohc
881f866d86
feat(sleep): pre-calculate EPUB cover dimensions for FIT/CROP modes
- Add JpegToBmpConverter::getJpegDimensions() to extract JPEG dimensions
- Fix getCoverBmpPath() ternary operator precedence bug
- Pre-calculate exact dimensions per mode:
  * FIT: width=480px, height=(480*jpegHeight)/jpegWidth
  * CROP: height=800px, width=(800*jpegWidth)/jpegHeight
- Generate separate cache files (cover_fit.bmp vs cover_crop.bmp)
- Eliminates runtime scaling artifacts, improves sleep screen clarity
2026-01-23 22:33:35 -05:00
cottongin
e3ae125f3c
adds Atkinson Hyperlegible Next 2026-01-23 22:17:55 -05:00
cottongin
67494a7c90
epub parsing improvement ideas 2026-01-23 22:16:52 -05:00
cottongin
59f493d293
add download feature to web file transfer 2026-01-23 07:57:44 -05:00
cottongin
ac1251282b
initial version of custom fonts 2026-01-23 03:54:39 -05:00
Daniel
16caa66b4a
perf: batch ZIP size lookup in buildBookBin (O(n*m) → O(n log n))
Add ZipFile::fillUncompressedSizes() for single-pass ZIP central directory
scan with hash-based target matching.

Also apply clang-format fixes for CI.

Shadow Slave results:
- buildBookBin: 506s → 35s
- Total indexing: 8.7min → 50s
2026-01-22 15:53:00 -05:00
Daniel
cf16d33710
perf: optimize large EPUB indexing from O(n²) to O(n log n)
Three optimizations for EPUBs with many chapters (e.g. 2768 chapters):

1. OPF idref→href lookup: Build sorted hash index during manifest parsing,
   use binary search during spine resolution. Reduces ~4min to ~30-60s.

2. TOC href→spineIndex lookup: Build sorted hash index in beginTocPass(),
   use binary search in createTocEntry(). Reduces ~4min to ~30-60s.

3. ZIP central-dir cursor: Resume scanning from last position instead of
   restarting from beginning. Reduces ~8min to ~1-3min.

All optimizations only activate for large EPUBs (≥400 spine items).
Small books use unchanged code paths.

Memory impact: ~33KB + ~39KB temporary during indexing, freed after.
Expected total: ~17min → ~3-5min for Shadow Slave (2768 chapters).

Also adds phase timing logs for performance measurement.
2026-01-22 15:53:00 -05:00
Daniel
51a4faddd4
fix: remove OOM-causing hrefToSpineIndex map from TOC pass
The unordered_map with 2768 string keys (~100KB+) was causing OOM crashes
at beginTocPass() on ESP32-C3's limited ~380KB RAM.

Reverted createTocEntry() to use original O(n) spine file scan instead.
Kept the safe spineToTocIndex vector in buildBookBin() (only ~5.5KB).
2026-01-22 15:52:45 -05:00
Daniel
a91bb0b1b8
perf: optimize large EPUB indexing from O(n²) to O(n)
Replace O(n²) lookups with O(n) preprocessing:

1. createTocEntry(): Build href->spineIndex map once in beginTocPass()
   instead of scanning spine file for every TOC entry

2. buildBookBin(): Build spineIndex->tocIndex vector in single pass
   instead of scanning TOC file for every spine entry

For 2768-chapter EPUBs, this reduces:
- TOC pass: from ~7.6M file reads to ~5.5K reads
- buildBookBin: from ~7.6M file reads to ~5.5K reads

Memory impact: ~80KB for href map (acceptable trade-off for 10x+ speedup)
2026-01-22 15:52:29 -05:00
Daniel
481b8210fb
fix: prevent OOM crash when loading large EPUBs (2000+ chapters)
Remove the call to loadAllFileStatSlims() which pre-loads all ZIP central
directory entries into memory. For EPUBs with 2000+ chapters (like webnovels),
this exhausts the ESP32-C3's ~380KB RAM and causes abort().

The existing loadFileStatSlim() function already handles individual lookups
by scanning the central directory per-file when the cache is empty. This is
O(n*m) instead of O(n), but prevents memory exhaustion.

Fixes #134
2026-01-22 15:52:07 -05:00
Jonas Diemer
c166b89f7b
Make sure img alt text is treated as separate text block 2026-01-22 15:48:32 -05:00
cottongin
d5a9873bd7
adds delete and archive abilities 2026-01-22 15:45:07 -05:00
cottongin
6b533207e1
fix cover art sizing options 2026-01-22 13:13:12 -05:00
cottongin
9493fb1f18
sort of working dictionary 2026-01-22 12:42:01 -05:00
cottongin
ff22a82563
Merge branch 'pr-411-css-parsing' 2026-01-21 19:40:45 -05:00
Dave Allie
3ce11f14ce
chore: Cut release 0.15.0 0.15.0 2026-01-22 02:20:22 +11:00
KasyanDiGris
47ef92e8fd
fix: OPDS browser OOM (#403)
## Summary

- Rewrite OpdsParser to stream parsing instead of full content
- Fix OOM due to big http xml response

Closes #385 

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**NO**_
2026-01-22 01:43:51 +11:00
Alex Faria
1e506cce39 Merge branch 'master' into alexfaria/status-progress-bar 2026-01-21 13:34:25 +00:00