Fix #1125102 (Device detected wrongly)

This commit is contained in:
Kovid Goyal 2013-03-20 14:45:54 +05:30
parent ea1b4f8032
commit 7e791304e9

View File

@ -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'