mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
ca4fd1f381
commit
89284513a7
@ -169,7 +169,9 @@ def upgrade_meta(root, data):
|
|||||||
|
|
||||||
def upgrade_cover(root, data):
|
def upgrade_cover(root, data):
|
||||||
for item in XPath('./opf:metadata/opf:meta[@name="cover"]')(root):
|
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')
|
item_id = item.get('content')
|
||||||
for item in XPath('./opf:manifest/opf:item[@id and @href and @media-type]')(root):
|
for item in XPath('./opf:manifest/opf:item[@id and @href and @media-type]')(root):
|
||||||
if item.get('id') == item_id:
|
if item.get('id') == item_id:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user