mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:54:28 +02:00
eReader PDB Output: Generate eReader header correctly when no chapter and link indexes are present.
This commit is contained in:
parent
1424435bff
commit
d373b5d71e
1 changed files with 2 additions and 8 deletions
|
|
@ -209,14 +209,8 @@ def _header_record(self, text_count, chapter_count, link_count, image_count):
|
|||
compression = 10 # zlib compression.
|
||||
non_text_offset = text_count + 1
|
||||
|
||||
if chapter_count > 0:
|
||||
chapter_offset = non_text_offset
|
||||
else:
|
||||
chapter_offset = text_count
|
||||
if link_count > 0:
|
||||
link_offset = chapter_offset + chapter_count
|
||||
else:
|
||||
link_offset = chapter_offset
|
||||
chapter_offset = non_text_offset
|
||||
link_offset = chapter_offset + chapter_count
|
||||
|
||||
if image_count > 0:
|
||||
image_data_offset = link_offset + link_count
|
||||
|
|
|
|||
Loading…
Reference in a new issue