mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
newdb: Fix passing in QImage to set_cover not working
This commit is contained in:
parent
6a893e48d8
commit
3046339a18
@ -1273,8 +1273,7 @@ class DB(object):
|
|||||||
if callable(getattr(data, 'save', None)):
|
if callable(getattr(data, 'save', None)):
|
||||||
from calibre.gui2 import pixmap_to_data
|
from calibre.gui2 import pixmap_to_data
|
||||||
data = pixmap_to_data(data)
|
data = pixmap_to_data(data)
|
||||||
else:
|
elif callable(getattr(data, 'read', None)):
|
||||||
if callable(getattr(data, 'read', None)):
|
|
||||||
data = data.read()
|
data = data.read()
|
||||||
if data is None:
|
if data is None:
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user