mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
...
This commit is contained in:
parent
f36f367c1b
commit
e519095956
@ -318,15 +318,15 @@ class OEBReader(object):
|
|||||||
continue
|
continue
|
||||||
item = manifest.ids[idref]
|
item = manifest.ids[idref]
|
||||||
spine.add(item, elem.get('linear'))
|
spine.add(item, elem.get('linear'))
|
||||||
if len(spine) == 0:
|
|
||||||
raise OEBError("Spine is empty")
|
|
||||||
self._spine_add_extra()
|
|
||||||
for item in spine:
|
for item in spine:
|
||||||
if item.media_type.lower() not in OEB_DOCS:
|
if item.media_type.lower() not in OEB_DOCS:
|
||||||
if not hasattr(item.data, 'xpath'):
|
if not hasattr(item.data, 'xpath'):
|
||||||
self.oeb.log.warn('The item %s is not a XML document.'
|
self.oeb.log.warn('The item %s is not a XML document.'
|
||||||
' Removing it from spine.'%item.href)
|
' Removing it from spine.'%item.href)
|
||||||
spine.remove(item)
|
spine.remove(item)
|
||||||
|
if len(spine) == 0:
|
||||||
|
raise OEBError("Spine is empty")
|
||||||
|
self._spine_add_extra()
|
||||||
|
|
||||||
def _guide_from_opf(self, opf):
|
def _guide_from_opf(self, opf):
|
||||||
guide = self.oeb.guide
|
guide = self.oeb.guide
|
||||||
|
Loading…
x
Reference in New Issue
Block a user