Commit Graph
892 Commits
Author SHA1 Message Date
jpirnay a2f31f06e7 adress cppcheck complaint 2026-04-23 19:45:38 +02:00
jpirnay 6053ef4756 Review comments 2026-04-23 17:08:08 +02:00
jpirnay 9621dc1181 Cleanup startup 2026-04-23 16:44:27 +02:00
jpirnay 42fa3a4ac8 clang 2026-04-23 12:19:55 +02:00
Arthur TazhitdinovandCopilot c867669560 feat: Support for multiple OPDS servers (#1209)
* Add support for configuring and using multiple OPDS servers, replacing
the previous single-server limitation. Closes
https://github.com/crosspoint-reader/crosspoint-reader/issues/1178
* New OpdsServerStore singleton (modeled after WifiCredentialStore) that
persists up to 8 OPDS servers to /.crosspoint/opds.json with MAC-based
password obfuscation.
* One-time migration from legacy single-server fields in
CrossPointSettings to the new store on first boot.
* New OpdsServerListActivity for the device UI — works in two modes: a
settings list (add/edit/delete servers) and a picker (select which
server to browse). When only one server is configured, the picker is
skipped automatically.
* Renamed CalibreSettingsActivity → OpdsSettingsActivity for clarity. It
now edits individual OpdsServer entries (name, URL, username, password,
delete).
* OpdsBookBrowserActivity now receives an OpdsServer at construction and
uses its credentials for all fetches/downloads, and shows the server
name in the header.
* HttpDownloader::fetchUrl and downloadToFile accept optional per-call
username/password parameters instead of reading from global settings.
* REST API endpoints on CrossPointWebServer: GET /api/opds, POST
/api/opds, POST /api/opds/delete — passwords are never exposed over the
API (only a hasPassword flag), and omitting the password field on update
preserves the existing one.
* Web UI (SettingsPage.html) with dynamic OPDS server management cards —
add, edit, save, and delete servers from the browser.
<img width="932" height="906" alt="SCR-20260416-stvu"
src="https://github.com/user-attachments/assets/a8f18d84-4204-46a0-bb31-b73d24b3255f"
/>

* The OpdsServerStore JSON format and obfuscation scheme are identical
to WifiCredentialStore, so the same JsonSettingsIO infrastructure
handles both.
* The web API uses POST /api/opds/delete instead of DELETE /api/opds
because the ESP32 WebServer doesn't support the DELETE method with a
request body.
* Existing single-server configurations are migrated automatically — no
user action required. After migration the legacy CrossPointSettings
fields are cleared so it only runs once.
* The HttpDownloader changes are backward-compatible: the credential
parameters default to empty strings, so existing callers are unaffected.

---

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? _**< YES >**_

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23 11:14:50 +02:00
jpirnay 0d68162a07 show long branch names (#1727) 2026-04-23 09:33:50 +02:00
jpirnay 8ff8418441 pluralize folder/file counts correctly in file list summary (#1701) 2026-04-23 09:30:50 +02:00
jpirnay 4981086a1d Update html title strings according to #1703 2026-04-23 09:29:28 +02:00
jpirnay 7da8b335ab Review comments 2026-04-21 22:16:23 +02:00
jpirnay 157a19ff35 Address cppcheck issue 2026-04-21 22:04:07 +02:00
jpirnay 4efbc035ba Try resetting the version info 2026-04-21 21:47:30 +02:00
jpirnay f6f18dcf15 Write directly 2026-04-21 18:27:59 +02:00
jpirnay df171560db Fix firmware download 2026-04-21 17:16:19 +02:00
jpirnay b7928a86e3 Add hotel Wifi connection 2026-04-21 17:15:56 +02:00
jpirnay d4c475470b Allow cancellation of download, dont block the device 2026-04-21 14:26:21 +02:00
jpirnay 425c1db132 Review comments 2026-04-20 21:16:31 +02:00
jpirnay 3a4923c8d5 yaclf 2026-04-20 21:00:20 +02:00
jpirnay a00712a085 Adjust warnings for x3 2026-04-20 20:50:33 +02:00
jpirnay a6aed8d30e Add additional timezones 2026-04-20 20:40:38 +02:00
jpirnay a7638bb7d3 Merge pull request #87 from jgoguen/opds-multi-format-select
feat(opds): Allow selecting the download format
2026-04-20 14:26:00 +02:00
jpirnay 83fe041a6b Merge pull request #109 from jpirnay/kosync_extension
refactor: Picking up some itsthisjustin ideas for KOreader synchronisation
2026-04-20 14:21:31 +02:00
jpirnay 36931aaa25 Merge pull request #108 from jpirnay/feature-webui-update
feat: webui update (integrate some ideas from upstream #1715 by pablohc)
2026-04-20 14:05:43 +02:00
jpirnay 29284c85c9 Review comments 2026-04-20 13:28:56 +02:00
jpirnay bbafd4ce62 Display error reason on ntp time sync fail 2026-04-20 10:32:52 +02:00
jpirnay ab9d47aac9 Review comments 2026-04-20 10:12:20 +02:00
jpirnay 26fb4d3b5a Cosmetic + sorting 2026-04-20 09:05:02 +02:00
jpirnay c8a02a8daa Folder move, multiple items move 2026-04-20 08:44:43 +02:00
Joel Goguen 1986092522 feat(opds): Allow selecting the download format
When downloading a book via OPDS, the last acquisition link is chosen when there are multiple. This allows choosing which format to download when there are many. Having only one format will automatically download that.
2026-04-19 23:15:54 -04:00
Joel Goguen c38013aac3 feat(UrlUtils): Resolve more URL formats
Resolves more formats of URLs correctly: absolute, root-relative, relative, parent-relative, and URLs with query strings and fragments.
2026-04-19 23:15:54 -04:00
jpirnay bc1b0499fd Fix unnecessary X3 battery drain 2026-04-19 19:22:48 +02:00
jpirnay d6292920d9 Picking up some itsthisjutin ideas 2026-04-19 19:03:43 +02:00
jpirnay 3e28b45888 Fix according to comment 2026-04-17 21:05:30 +02:00
jpirnay e74e52b23a Review comments 2026-04-17 20:59:49 +02:00
jpirnay d39246ee70 yaclf 2026-04-17 20:54:49 +02:00
jpirnay 6ca8de8329 Reduce debug logging 2026-04-17 20:43:36 +02:00
jpirnay b4881e1563 Refactor ActivityManager calls 2026-04-17 20:23:42 +02:00
jpirnay ef088db789 Add more logging 2026-04-17 19:09:16 +02:00
jpirnay bf7869dfce More logging points 2026-04-17 18:44:50 +02:00
jpirnay e5cd758380 Add logs 2026-04-17 18:17:35 +02:00
jpirnay fbde017d88 Fix usage 2026-04-17 18:00:30 +02:00
jpirnay de314182f7 mitigating fragmented heap 2026-04-17 17:02:50 +02:00
jpirnay 4bada707b3 Fix getter 2026-04-17 16:46:48 +02:00
jpirnay efbe8adf43 cppcheck finding 2026-04-17 16:41:24 +02:00
jpirnay 8b6db63788 Add guard 2026-04-17 16:33:15 +02:00
jpirnay e0fb3e0160 More comments 2026-04-17 16:25:29 +02:00
jpirnay a8816b2964 Remove outdated static variant 2026-04-17 16:16:27 +02:00
jpirnay af018af03a style fixes 2026-04-17 15:59:58 +02:00
jpirnay 87b9d333f7 Review changes 2026-04-17 15:54:08 +02:00
jpirnay 106e9d31e6 Reduce heap pressure 2026-04-17 15:53:57 +02:00
jpirnay 2b17872c16 Refactor spaghetti code 2026-04-17 15:39:02 +02:00