mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Detect an NCX TOC which isn't mentioned by the /spine/@toc.
This commit is contained in:
parent
9a30cdc3f2
commit
6550c18745
@ -602,6 +602,9 @@ class OEBBook(object):
|
||||
def _toc_from_ncx(self, opf):
|
||||
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
||||
if not result:
|
||||
expr = '/o2:package/o2:manifest/o2:item[@media-type="%s"]/@id'
|
||||
result = xpath(opf, expr % NCX_MIME)
|
||||
if len(result) != 1:
|
||||
return False
|
||||
id = result[0]
|
||||
ncx = self.manifest[id].data
|
||||
|
Loading…
x
Reference in New Issue
Block a user