From e3adac0c51090d5581beb3df1a8ff4be3761b13b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 26 Oct 2019 14:27:45 +0530 Subject: [PATCH] Forgot another use of container.bookmark_data --- src/calibre/srv/render_book.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/srv/render_book.py b/src/calibre/srv/render_book.py index 9da8db8256..e0f2e4be7e 100644 --- a/src/calibre/srv/render_book.py +++ b/src/calibre/srv/render_book.py @@ -802,8 +802,8 @@ def parse_annotations(raw): yield parse_annotation(annot) -def get_stored_annotations(container): - raw = container.bookmark_data or b'' +def get_stored_annotations(container, bookmark_data): + raw = bookmark_data or b'' if not raw: return if raw.startswith(EPUB_FILE_TYPE_MAGIC): @@ -848,7 +848,7 @@ def render(pathtoebook, output_dir, book_hash=None, serialize_metadata=False, ex if extract_annotations: annotations = None if bookmark_data: - annotations = json_dumps(tuple(get_stored_annotations(container))) + annotations = json_dumps(tuple(get_stored_annotations(container, bookmark_data))) if annotations: with lopen(os.path.join(output_dir, 'calibre-book-annotations.json'), 'wb') as f: f.write(annotations)