Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ebooklib/epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1724,8 +1724,7 @@ def _load_spine(self):

# should read ncx or nav file
nav_item = next((item for item in self.book.items if isinstance(item, EpubNav)), None)
if toc:
if not self.options.get("ignore_ncx") or not nav_item:
if toc and not self.options.get("ignore_ncx") and not nav_item:
try:
ncxFile = self.read_file(zip_path.join(self.opf_dir, self.book.get_item_with_id(toc).get_name()))
except KeyError:
Expand Down