mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
...
This commit is contained in:
parent
b5bc1ef8f7
commit
8824104847
@ -116,6 +116,12 @@ class Serializer(object):
|
|||||||
buf.write(b'</html>')
|
buf.write(b'</html>')
|
||||||
self.end_offset = buf.tell()
|
self.end_offset = buf.tell()
|
||||||
self.fixup_links()
|
self.fixup_links()
|
||||||
|
if self.start_offset is None:
|
||||||
|
# If we don't set a start offset, the stupid Kindle will
|
||||||
|
# open the book at the location of the first IndexEntry, which
|
||||||
|
# could be anywhere. So ensure the book is always opened at the
|
||||||
|
# beginning, instead.
|
||||||
|
self.start_offset = self.body_start_offset
|
||||||
return buf.getvalue()
|
return buf.getvalue()
|
||||||
|
|
||||||
def serialize_head(self):
|
def serialize_head(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user