mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 00:56:20 +01:00
eReader Input: Use included cover when avaliable.
This commit is contained in:
parent
56fd576055
commit
1e6651393e
1 changed files with 4 additions and 1 deletions
|
|
@ -164,12 +164,15 @@ def extract_content(self, output_dir):
|
|||
|
||||
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'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue