CreDocuments: save EPubCFI alongside xpointers (last_pos, annotations)

EPubCFI is the per-EPUB-specs equivalent of our xpointers.
Save the EPubCFI version of our xpointers in metadata.epub.lua
so they can be used by plugins or external tools.
They are not used internally.
This commit is contained in:
Adam Buntain-Cooper authored and GitHub committed 2026-10-09 08:38:20 +02:00
1 parent 2adaff6e46
commit 0deae50039
7 files changed
+106 -1

No files matched your search

@@ -287,6 +287,8 @@ function ReaderRolling:onCloseDocument()
self.current_header_height = nil -- show unload progress bar at top
self.ui.doc_settings:saveSetting("last_epubcfi", self.ui.document:getEPubCFIFromXPointer(self.xpointer))
local cache_file_path = self.ui.document:getCacheFilePath() -- nil if no cache file
self.ui.doc_settings:saveSetting("cache_file_path", cache_file_path)
if self.ui.document:hasCacheFile() then