mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 07:53:09 +02:00
...
This commit is contained in:
parent
2a44814b37
commit
f07ae77929
1 changed files with 4 additions and 1 deletions
|
|
@ -364,7 +364,10 @@ def _toc_from_ncx(self, item):
|
|||
ncx = item.data
|
||||
title = ''.join(xpath(ncx, 'ncx:docTitle/ncx:text/text()'))
|
||||
title = COLLAPSE_RE.sub(' ', title.strip())
|
||||
title = title or unicode(self.oeb.metadata.title[0])
|
||||
try:
|
||||
title = title or unicode(self.oeb.metadata.title[0])
|
||||
except:
|
||||
title = _('Unknown')
|
||||
toc = self.oeb.toc
|
||||
toc.title = title
|
||||
navmaps = xpath(ncx, 'ncx:navMap')
|
||||
|
|
|
|||
Loading…
Reference in a new issue