Mark title page in OPF when upgrading

This commit is contained in:
Kovid Goyal 2018-04-15 11:07:40 +05:30
parent 31f642e951
commit c9a8e46d1a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -105,6 +105,8 @@ def create_nav(container, toc, landmarks):
if landmarks: if landmarks:
for entry in landmarks: for entry in landmarks:
entry['type'] = guide_epubtype_map.get(entry['type'].lower()) entry['type'] = guide_epubtype_map.get(entry['type'].lower())
if entry['type'] == 'cover' and container.mime_map.get(entry['dest'], '').lower() in OEB_DOCS:
container.apply_unique_properties(entry['dest'], 'calibre:title-page')
commit_nav_toc(container, toc, lang=lang, landmarks=landmarks) commit_nav_toc(container, toc, lang=lang, landmarks=landmarks)