mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix regression that made list of books on device un browseable
This commit is contained in:
parent
ac1a747754
commit
7e270ac92e
@ -668,7 +668,11 @@ class DeviceBooksModel(BooksModel):
|
|||||||
item = self.db[self.map[current.row()]]
|
item = self.db[self.map[current.row()]]
|
||||||
cdata = item.thumbnail
|
cdata = item.thumbnail
|
||||||
if cdata:
|
if cdata:
|
||||||
data['cover'] = cdata
|
img = QImage()
|
||||||
|
img.loadFromData(cdata)
|
||||||
|
if img.isNull():
|
||||||
|
img = self.default_image
|
||||||
|
data['cover'] = img
|
||||||
type = _('Unknown')
|
type = _('Unknown')
|
||||||
ext = os.path.splitext(item.path)[1]
|
ext = os.path.splitext(item.path)[1]
|
||||||
if ext:
|
if ext:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user