mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Fix a bug preventing marking an image as cover in a book that previously had no cover
This commit is contained in:
parent
1ad7b5dca2
commit
02610b66bb
@ -150,7 +150,7 @@ def mark_as_cover_epub(container, name):
|
||||
if not container.opf_xpath('//opf:guide/opf:reference[@type="cover"]'):
|
||||
for guide in container.opf_xpath('//opf:guide'):
|
||||
container.insert_into_xml(guide, guide.makeelement(
|
||||
OPF('reference', type='cover', href=container.name_to_href(name, container.opf_name))))
|
||||
OPF('reference'), type='cover', href=container.name_to_href(name, container.opf_name)))
|
||||
|
||||
container.dirty(container.opf_name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user