mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix a regression that broke viewing of HTMLZ files
Fixes #1691976 [ebook-viewer cannot open htmlz-files](https://bugs.launchpad.net/calibre/+bug/1691976)
This commit is contained in:
parent
4a5dcef805
commit
5c8f4a10a1
@ -152,11 +152,15 @@ class EbookIterator(BookmarksMixin):
|
|||||||
self.language = None
|
self.language = None
|
||||||
if self.mi.languages:
|
if self.mi.languages:
|
||||||
self.language = self.mi.languages[0].lower()
|
self.language = self.mi.languages[0].lower()
|
||||||
ordered = [i for i in self.opf.spine if i.is_linear] + \
|
|
||||||
[i for i in self.opf.spine if not i.is_linear]
|
|
||||||
self.spine = []
|
self.spine = []
|
||||||
Spiny = partial(SpineItem, read_anchor_map=read_anchor_map, read_links=read_links,
|
Spiny = partial(SpineItem, read_anchor_map=read_anchor_map, read_links=read_links,
|
||||||
run_char_count=run_char_count, from_epub=self.book_format == 'EPUB')
|
run_char_count=run_char_count, from_epub=self.book_format == 'EPUB')
|
||||||
|
if input_fmt.lower() == 'htmlz':
|
||||||
|
self.spine.append(Spiny(os.path.join(os.path.dirname(self.pathtoopf), 'index.html'), mime_type='text/html'))
|
||||||
|
else:
|
||||||
|
ordered = [i for i in self.opf.spine if i.is_linear] + \
|
||||||
|
[i for i in self.opf.spine if not i.is_linear]
|
||||||
is_comic = input_fmt.lower() in {'cbc', 'cbz', 'cbr', 'cb7'}
|
is_comic = input_fmt.lower() in {'cbc', 'cbz', 'cbr', 'cb7'}
|
||||||
for i in ordered:
|
for i in ordered:
|
||||||
spath = i.path
|
spath = i.path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user