mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix error when downloading only covers and reviewing downloaded metadata. Fixes #1176253 (Bulk Download Covers Only - 0.9.29)
This commit is contained in:
parent
f7a44c80f8
commit
654ce41161
@ -240,9 +240,10 @@ class EditMetadataAction(InterfaceAction):
|
|||||||
opf, cov = id_map[book_id]
|
opf, cov = id_map[book_id]
|
||||||
cfile = mi.cover
|
cfile = mi.cover
|
||||||
mi.cover, mi.cover_data = None, (None, None)
|
mi.cover, mi.cover_data = None, (None, None)
|
||||||
with open(opf, 'wb') as f:
|
if opf is not None:
|
||||||
f.write(metadata_to_opf(mi))
|
with open(opf, 'wb') as f:
|
||||||
if cfile:
|
f.write(metadata_to_opf(mi))
|
||||||
|
if cfile and cov:
|
||||||
shutil.copyfile(cfile, cov)
|
shutil.copyfile(cfile, cov)
|
||||||
os.remove(cfile)
|
os.remove(cfile)
|
||||||
nid_map[book_id] = id_map[book_id]
|
nid_map[book_id] = id_map[book_id]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user