mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -347,7 +347,9 @@ class OEBReader(object):
|
|||||||
self.logger.warn(u'Guide reference %r not found' % href)
|
self.logger.warn(u'Guide reference %r not found' % href)
|
||||||
continue
|
continue
|
||||||
href = corrected_href
|
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):
|
def _find_ncx(self, opf):
|
||||||
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user