mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2624 (KeyError: 'last_læight_of_the_sun')
This commit is contained in:
parent
5b1aacfdca
commit
77bfb1c08d
@ -1104,7 +1104,7 @@ class MobiWriter(object):
|
||||
exth.write(data)
|
||||
nrecs += 1
|
||||
if oeb.metadata.cover:
|
||||
id = str(oeb.metadata.cover[0])
|
||||
id = unicode(oeb.metadata.cover[0])
|
||||
item = oeb.manifest.ids[id]
|
||||
href = item.href
|
||||
index = self._images[href] - 1
|
||||
|
@ -725,7 +725,7 @@ class Manifest(object):
|
||||
self._data = data
|
||||
|
||||
def __repr__(self):
|
||||
return 'Item(id=%r, href=%r, media_type=%r)' \
|
||||
return u'Item(id=%r, href=%r, media_type=%r)' \
|
||||
% (self.id, self.href, self.media_type)
|
||||
|
||||
def _parse_xhtml(self, data):
|
||||
|
@ -187,7 +187,7 @@ class SVGRasterizer(object):
|
||||
covers = self.oeb.metadata.cover
|
||||
if not covers:
|
||||
return
|
||||
cover = self.oeb.manifest.ids[str(covers[0])]
|
||||
cover = self.oeb.manifest.ids[unicode(covers[0])]
|
||||
if not cover.media_type == SVG_MIME:
|
||||
return
|
||||
width = (self.profile.width / 72) * self.profile.dpi
|
||||
|
Loading…
x
Reference in New Issue
Block a user