From 7e791304e94426aa2c1e48665580af2bd06985e4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 20 Mar 2013 14:45:54 +0530 Subject: [PATCH] Fix #1125102 (Device detected wrongly) --- src/calibre/devices/misc.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/calibre/devices/misc.py b/src/calibre/devices/misc.py index d7a4531fc7..d8a8ed1871 100644 --- a/src/calibre/devices/misc.py +++ b/src/calibre/devices/misc.py @@ -413,16 +413,16 @@ class WAYTEQ(USBMS): name = 'WayteQ device interface' gui_name = 'WayteQ xBook' - description = _('Communicate with the WayteQ Reader') + description = _('Communicate with the WayteQ and SPC Dickens Readers') author = 'Kovid Goyal' supported_platforms = ['windows', 'osx', 'linux'] # Ordered list of supported formats FORMATS = ['epub', 'mobi', 'prc', 'fb2', 'txt', 'pdf', 'html', 'rtf', 'chm', 'djvu', 'doc'] - VENDOR_ID = [0x05e3] - PRODUCT_ID = [0x0726] - BCD = [0x0222] + VENDOR_ID = [0x05e3, 0x0c45] + PRODUCT_ID = [0x0726, 0x0184] + BCD = [0x0222, 0x0100] EBOOK_DIR_MAIN = 'Documents' SCAN_FROM_ROOT = True @@ -431,6 +431,14 @@ class WAYTEQ(USBMS): WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = 'RK28_SDK_DEMO' SUPPORTS_SUB_DIRS = True + def get_gui_name(self): + try: + if self.detected_device.idVendor == 0x0c45: + return 'SPC Dickens' + except Exception: + pass + return self.gui_name + def get_carda_ebook_dir(self, for_upload=False): if for_upload: return 'Documents'