From 5574f36c75dab3ef40e5501682b3a9b7bdfe934f Mon Sep 17 00:00:00 2001 From: John Schember Date: Thu, 3 Dec 2009 18:48:19 -0500 Subject: [PATCH] PML Input: Set cover properly if it is avaliable. --- src/calibre/ebooks/pml/input.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/pml/input.py b/src/calibre/ebooks/pml/input.py index c88a4f947d..45f54f192f 100644 --- a/src/calibre/ebooks/pml/input.py +++ b/src/calibre/ebooks/pml/input.py @@ -123,6 +123,8 @@ class PMLInput(InputFormatPlugin): from calibre.ebooks.metadata.meta import get_metadata log.debug('Reading metadata from input file...') mi = get_metadata(stream, 'pml') + if 'images/cover.png' in images: + mi.cover = 'images/cover.png' opf = OPFCreator(os.getcwd(), mi) log.debug('Generating manifest...') opf.create_manifest(manifest_items)