mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improved Cybook device detection on windows
This commit is contained in:
commit
a494f2918a
@ -60,8 +60,9 @@ class DeviceScanner(object):
|
|||||||
def is_device_connected(self, device):
|
def is_device_connected(self, device):
|
||||||
if iswindows:
|
if iswindows:
|
||||||
vid, pid = 'vid_%4.4x'%device.VENDOR_ID, 'pid_%4.4x'%device.PRODUCT_ID
|
vid, pid = 'vid_%4.4x'%device.VENDOR_ID, 'pid_%4.4x'%device.PRODUCT_ID
|
||||||
|
vidd, pidd = 'vid_%i'%device.VENDOR_ID, 'pid_%i'%device.PRODUCT_ID
|
||||||
for device_id in self.devices:
|
for device_id in self.devices:
|
||||||
if vid in device_id and pid in device_id:
|
if (vid in device_id or vidd in device_id) and (pid in device_id or pidd in device_id):
|
||||||
if self.test_bcd_windows(device_id, getattr(device, 'BCD', None)):
|
if self.test_bcd_windows(device_id, getattr(device, 'BCD', None)):
|
||||||
if device.can_handle(device_id):
|
if device.can_handle(device_id):
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user