From c9a8e46d1ab4fb3767d60c34e492614d891a80b9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 15 Apr 2018 11:07:40 +0530 Subject: [PATCH] Mark title page in OPF when upgrading --- src/calibre/ebooks/oeb/polish/upgrade.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/oeb/polish/upgrade.py b/src/calibre/ebooks/oeb/polish/upgrade.py index a65e8b45c4..64859343cf 100644 --- a/src/calibre/ebooks/oeb/polish/upgrade.py +++ b/src/calibre/ebooks/oeb/polish/upgrade.py @@ -105,6 +105,8 @@ def create_nav(container, toc, landmarks): if landmarks: for entry in landmarks: 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)