This commit is contained in:
Kovid Goyal 2008-05-14 16:02:40 -07:00
parent 857455241a
commit d8e4b9103f

View File

@ -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