From 2f98ce3a8eade996fa2a3b336c889c53634eb2bd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 Feb 2025 10:01:50 +0530 Subject: [PATCH] Implement saving of calibre_bookmarks in kepub --- src/calibre/gui2/viewer/annotations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/viewer/annotations.py b/src/calibre/gui2/viewer/annotations.py index 8275b244c7..64d40514bb 100644 --- a/src/calibre/gui2/viewer/annotations.py +++ b/src/calibre/gui2/viewer/annotations.py @@ -98,7 +98,8 @@ class AnnotationsSaveWorker(Thread): def save_annotations(self, current_book_data, in_book_file=True, sync_annots_user=''): alist = tuple(annotations_as_copied_list(current_book_data['annotations_map'])) ebp = current_book_data['pathtoebook'] - can_save_in_book_file = ebp.lower().endswith('.epub') + ext = ebp.rpartition('.')[-1].lower() + can_save_in_book_file = ext in ('epub', 'kepub') self.queue.put({ 'annotations_list': alist, 'annotations_path_key': current_book_data['annotations_path_key'],