mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #680
This commit is contained in:
parent
857455241a
commit
d8e4b9103f
@ -233,11 +233,20 @@ class LrsParser(object):
|
|||||||
bs = self.soup.find('booksetting')
|
bs = self.soup.find('booksetting')
|
||||||
bs = BookSetting(**self.attrs_to_dict(bs, []))
|
bs = BookSetting(**self.attrs_to_dict(bs, []))
|
||||||
|
|
||||||
|
settings = {}
|
||||||
|
thumbnail = self.soup.find('cthumbnail')
|
||||||
|
if thumbnail is not None:
|
||||||
|
f = thumbnail['file']
|
||||||
|
if os.access(f, os.R_OK):
|
||||||
|
settings['thumbnail'] = f
|
||||||
|
else:
|
||||||
|
print _('Could not read from thumbnail file:'), f
|
||||||
|
|
||||||
self.book = Book(title=title, author=author, publisher=publisher,
|
self.book = Book(title=title, author=author, publisher=publisher,
|
||||||
category=category, classification=classification,
|
category=category, classification=classification,
|
||||||
freetext=freetext, language=language, creator=creator,
|
freetext=freetext, language=language, creator=creator,
|
||||||
producer=producer, bookid=bookid, setdefault=sd,
|
producer=producer, bookid=bookid, setdefault=sd,
|
||||||
booksetting=bs)
|
booksetting=bs, **settings)
|
||||||
|
|
||||||
for hdr in self.soup.findAll(['header', 'footer']):
|
for hdr in self.soup.findAll(['header', 'footer']):
|
||||||
elem = Header if hdr.name == 'header' else Footer
|
elem = Header if hdr.name == 'header' else Footer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user