Edit Book: Fix incorrect EPUB 3 declarations being added to the OPF file when adding covers to an EPUB 2 book

This commit is contained in:
Kovid Goyal 2018-01-04 23:31:16 +05:30
parent 7cbf2e2a2c
commit 66a6f90b1d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -302,6 +302,8 @@ def clean_opf(container):
name = gtm.get(typ, None) name = gtm.get(typ, None)
if name and name in container.name_path_map: if name and name in container.name_path_map:
yield name yield name
ver = container.opf_version_parsed
if ver.major > 2:
removed_names = container.apply_unique_properties(None, 'cover-image', 'calibre:title-page')[0] removed_names = container.apply_unique_properties(None, 'cover-image', 'calibre:title-page')[0]
for name in removed_names: for name in removed_names:
yield name yield name