[PR #2601] Add highlight annotations to ebooks #3745

Open
opened 2026-04-25 00:16:54 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2601
Author: @MxMarx
Created: 2/11/2024
Status: 🔄 Open

Base: masterHead: add-epub-annotations


📝 Commits (1)

  • 5682d2c Add highlight annotations to ebooks

📊 Changes

7 files changed (+298 additions, -92 deletions)

View changed files

📝 client/components/readers/EpubReader.vue (+142 -9)
📝 client/components/readers/Reader.vue (+25 -61)
client/components/readers/Sidebar.vue (+96 -0)
📝 client/store/user.js (+3 -2)
📝 server/controllers/MeController.js (+18 -10)
📝 server/objects/user/AudioBookmark.js (+5 -1)
📝 server/objects/user/User.js (+9 -9)

📄 Description

This pull request adds the ability to highlight and save text in epubs. Saved bookmarks reuse the existing "search book" ui.

image

To accomplish this, I used the existing bookmark schema, with the time property storing the CFI of the highlighted text.
This posed a dilemma if a library item has both an audiobook and an ebook because they share the same id, so I extended the bookmark schema and api with a type property, which defaults to audio. This could cause problems if the ebook file changes after bookmarks are added, but that could probably be solved with some type of fingerprinting.

resolves #1558
resolves #1709

Should be compatible with #2584, but if not, I'll resolve any conflicts.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2601 **Author:** [@MxMarx](https://github.com/MxMarx) **Created:** 2/11/2024 **Status:** 🔄 Open **Base:** `master` ← **Head:** `add-epub-annotations` --- ### 📝 Commits (1) - [`5682d2c`](https://github.com/advplyr/audiobookshelf/commit/5682d2c7e8816f4186d420a48bbc0fbb083f0c71) Add highlight annotations to ebooks ### 📊 Changes **7 files changed** (+298 additions, -92 deletions) <details> <summary>View changed files</summary> 📝 `client/components/readers/EpubReader.vue` (+142 -9) 📝 `client/components/readers/Reader.vue` (+25 -61) ➕ `client/components/readers/Sidebar.vue` (+96 -0) 📝 `client/store/user.js` (+3 -2) 📝 `server/controllers/MeController.js` (+18 -10) 📝 `server/objects/user/AudioBookmark.js` (+5 -1) 📝 `server/objects/user/User.js` (+9 -9) </details> ### 📄 Description This pull request adds the ability to highlight and save text in epubs. Saved bookmarks reuse the existing "search book" ui. ![image](https://github.com/advplyr/audiobookshelf/assets/44880075/2be5ebe1-6c48-4af4-ab9a-5402b2bd8813) To accomplish this, I used the existing bookmark schema, with the `time` property storing the CFI of the highlighted text. This posed a dilemma if a library item has both an audiobook and an ebook because they share the same id, so I extended the bookmark schema and api with a `type` property, which defaults to `audio`. This could cause problems if the ebook file changes after bookmarks are added, but that could probably be solved with some type of fingerprinting. resolves #1558 resolves #1709 Should be compatible with #2584, but if not, I'll resolve any conflicts. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:54 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3745