calibredb add: Fix the --cover option not working if the book being added has its own cover. Fixes #1562507 [calibredb add -c ./cover.jpg not working](https://bugs.launchpad.net/calibre/+bug/1562507)

This commit is contained in:
Kovid Goyal 2016-03-27 20:43:10 +05:30
parent d0d3d6227e
commit 7561f07fc7

View File

@ -299,6 +299,7 @@ def do_add(db, paths, one_book_per_directory, recurse, add_duplicates, otitle,
mi.series_index = oseries_index
if ocover:
mi.cover = ocover
mi.cover_data = (None, None)
formats.append(format)
metadata.append(mi)