Kindle driver: Increase the size of the cover thumbnails sent by calibre to the device. This fixes the problem of cover thumbnails not showing up on the PaperWhite

This commit is contained in:
Kovid Goyal 2012-10-18 08:29:45 +05:30
parent 651aeec502
commit beb3c260dc
2 changed files with 6 additions and 3 deletions

View file

@ -285,8 +285,8 @@ def add_annotation_to_library(self, db, db_id, annotation):
class KINDLE2(KINDLE):
name = 'Kindle 2/3/4/Touch Device Interface'
description = _('Communicate with the Kindle 2/3/4/Touch eBook reader.')
name = 'Kindle 2/3/4/Touch/PaperWhite Device Interface'
description = _('Communicate with the Kindle 2/3/4/Touch/PaperWhite eBook reader.')
FORMATS = ['azw', 'mobi', 'azw3', 'prc', 'azw1', 'tpz', 'azw4', 'pobi', 'pdf', 'txt']
DELETE_EXTS = KINDLE.DELETE_EXTS + ['.mbp1', '.mbs', '.sdr', '.han']
@ -327,7 +327,9 @@ class KINDLE2(KINDLE):
OPT_APNX = 0
OPT_APNX_ACCURATE = 1
OPT_APNX_CUST_COL = 2
THUMBNAIL_HEIGHT = 180
# x330 on the PaperWhite
THUMBNAIL_HEIGHT = 330
# x262 on the Touch. Doesn't choke on x330, though.
def formats_to_scan_for(self):
ans = USBMS.formats_to_scan_for(self) | {'azw3'}

View file

@ -7,6 +7,7 @@
class MobiError(Exception):
pass
# That might be a bit small on the PW, but Amazon/KG 2.5 still uses these values, even when delivered to a PW
MAX_THUMB_SIZE = 16 * 1024
MAX_THUMB_DIMEN = (180, 240)