EPUB Output: When generating EPUB 3 preserve the old style meta tag to identify the cover as Google Play Books does not recognize EPUB 3 cover markup. See #1832660 (add cover to epub)

This commit is contained in:
Kovid Goyal 2019-06-14 11:03:21 +05:30
parent ca4fd1f381
commit 89284513a7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -169,7 +169,9 @@ def upgrade_meta(root, data):
def upgrade_cover(root, data):
for item in XPath('./opf:metadata/opf:meta[@name="cover"]')(root):
remove_element(item, data.refines)
# Google Play Books does not recognize covers unless the old style
# <meta name="cover"> is present, so leave it in
# remove_element(item, data.refines)
item_id = item.get('content')
for item in XPath('./opf:manifest/opf:item[@id and @href and @media-type]')(root):
if item.get('id') == item_id: