mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
HTMLZ: Keep existing non-metadata sections when updating.
This commit is contained in:
parent
07da7b239c
commit
6fbb996d2a
@ -70,7 +70,8 @@ def set_metadata(stream, mi):
|
||||
# Update the metadata.
|
||||
old_mi = opf.to_book_metadata()
|
||||
old_mi.smart_update(mi)
|
||||
newopf = StringIO(metadata_to_opf(old_mi))
|
||||
opf.smart_update(metadata_to_opf(old_mi))
|
||||
newopf = StringIO(opf.render())
|
||||
safe_replace(stream, opf_path, newopf, extra_replacements=replacements, add_missing=True)
|
||||
|
||||
# Cleanup temporary files.
|
||||
|
Loading…
x
Reference in New Issue
Block a user