eReader Input: Use included cover when avaliable.

This commit is contained in:
John Schember 2009-12-03 20:10:07 -05:00
parent 56fd576055
commit 1e6651393e

View File

@ -164,12 +164,15 @@ class Reader132(FormatReader):
def create_opf(self, output_dir, images):
with CurrentDir(output_dir):
if 'cover.png' in images:
self.mi.cover = os.path.join('images', 'cover.png')
opf = OPFCreator(output_dir, self.mi)
manifest = [('index.html', None)]
for i in images:
manifest.append((os.path.join('images/', i), None))
manifest.append((os.path.join('images', i), None))
opf.create_manifest(manifest)
opf.create_spine(['index.html'])