mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: When viewing epub files that have their cover marked as non-linear, show the cover at the start of the book instead of the end. Fixes #1126030 (Epub file: import ziped and cover position)
This commit is contained in:
parent
68007f2c7f
commit
173a3cbd9c
@ -103,6 +103,12 @@ class EPUBInput(InputFormatPlugin):
|
||||
if not self.for_viewer:
|
||||
spine[0].getparent().remove(spine[0])
|
||||
removed = guide_cover
|
||||
else:
|
||||
# Ensure the cover is displayed as the first item in the book, some
|
||||
# epub files have it set with liner='no' which causes the cover to
|
||||
# display in the end
|
||||
spine[0].attrib.pop('linear', None)
|
||||
opf.spine[0].is_linear = True
|
||||
guide_elem.set('href', 'calibre_raster_cover.jpg')
|
||||
from calibre.ebooks.oeb.base import OPF
|
||||
t = etree.SubElement(elem[0].getparent(), OPF('item'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user