mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Pickup cover from archives if filename is specified
This commit is contained in:
parent
0b68623f86
commit
97eab19417
@ -1284,8 +1284,10 @@ def process_file(path, options, logger=None):
|
||||
cpath, tpath = '', ''
|
||||
try_opf(path, options, logger)
|
||||
if options.cover:
|
||||
options.cover = os.path.abspath(os.path.expanduser(options.cover))
|
||||
cpath = options.cover
|
||||
cpath = os.path.join(dirpath, os.path.basename(options.cover))
|
||||
if not os.path.exists(cpath):
|
||||
cpath = os.path.abspath(os.path.expanduser(options.cover))
|
||||
options.cover = cpath
|
||||
if os.access(options.cover, os.R_OK):
|
||||
from libprs500.devices.prs500.driver import PRS500
|
||||
im = PILImage.open(os.path.join(cwd, cpath))
|
||||
|
Loading…
x
Reference in New Issue
Block a user