mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #8656 (Attempting to merge two books, getting ValueError)
This commit is contained in:
parent
ac8ea5b16b
commit
7239c3af01
@ -1549,7 +1549,9 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
elif mi.cover is not None:
|
elif mi.cover is not None:
|
||||||
if os.access(mi.cover, os.R_OK):
|
if os.access(mi.cover, os.R_OK):
|
||||||
with lopen(mi.cover, 'rb') as f:
|
with lopen(mi.cover, 'rb') as f:
|
||||||
doit(self.set_cover, id, f, commit=False)
|
raw = f.read()
|
||||||
|
if raw:
|
||||||
|
doit(self.set_cover, id, raw, commit=False)
|
||||||
if mi.tags:
|
if mi.tags:
|
||||||
doit(self.set_tags, id, mi.tags, notify=False, commit=False)
|
doit(self.set_tags, id, mi.tags, notify=False, commit=False)
|
||||||
if mi.comments:
|
if mi.comments:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user