mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-20 06:16:22 +01:00
EPUB Input: When there are multiple elements of the same type in the OPF guide, use the first rather than the last element.
This commit is contained in:
parent
5f122fd712
commit
484d58baa3
1 changed files with 3 additions and 1 deletions
|
|
@ -347,7 +347,9 @@ def _guide_from_opf(self, opf):
|
|||
self.logger.warn(u'Guide reference %r not found' % href)
|
||||
continue
|
||||
href = corrected_href
|
||||
guide.add(elem.get('type'), elem.get('title'), href)
|
||||
typ = elem.get('type')
|
||||
if typ not in guide:
|
||||
guide.add(typ, elem.get('title'), href)
|
||||
|
||||
def _find_ncx(self, opf):
|
||||
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
||||
|
|
|
|||
Loading…
Reference in a new issue