mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
KTouch - Image file names have changed - fix display of covers
This commit is contained in:
parent
1ba097768d
commit
be026b8d2b
@ -85,6 +85,16 @@ class KOBO(USBMS):
|
||||
except:
|
||||
self.fwversion = 'unknown'
|
||||
|
||||
# Determine Hardware version differences
|
||||
product_id = self.detected_device.idProduct
|
||||
debug_print ("device: ", product_id)
|
||||
if product_id == 0x4161: #Original and KWifi
|
||||
image_suffix = ' - NickelBookCover.parsed'
|
||||
else: #KTouch
|
||||
image_suffix = ' - N3_LIBRARY_FULL.parsed'
|
||||
|
||||
debug_print("Image Suffix: ", image_suffix)
|
||||
|
||||
if self.fwversion != '1.0' and self.fwversion != '1.4':
|
||||
self.has_kepubs = True
|
||||
debug_print('Version of firmware: ', self.fwversion, 'Has kepubs:', self.has_kepubs)
|
||||
@ -125,8 +135,9 @@ class KOBO(USBMS):
|
||||
if idx is not None:
|
||||
bl_cache[lpath] = None
|
||||
if ImageID is not None:
|
||||
imagename = self.normalize_path(self._main_prefix + '.kobo/images/' + ImageID + ' - NickelBookCover.parsed')
|
||||
imagename = self.normalize_path(self._main_prefix + '.kobo/images/' + ImageID + image_suffix)
|
||||
#print "Image name Normalized: " + imagename
|
||||
|
||||
if imagename is not None:
|
||||
bl[idx].thumbnail = ImageWrapper(imagename)
|
||||
if (ContentType != '6' and MimeType != 'Shortcover'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user