mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -209,14 +209,8 @@ class Writer(FormatWriter):
|
||||
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…
x
Reference in New Issue
Block a user