mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Possible fix for only detecting BeBook main memory and not card.
This commit is contained in:
parent
8ff44715fb
commit
7999b3c188
@ -44,6 +44,10 @@ class BEBOOK(USBMS):
|
|||||||
drives['main'] = card
|
drives['main'] = card
|
||||||
drives['carda'] = main
|
drives['carda'] = main
|
||||||
|
|
||||||
|
if card and not main:
|
||||||
|
drives['main'] = card
|
||||||
|
drives['carda'] = None
|
||||||
|
|
||||||
return drives
|
return drives
|
||||||
|
|
||||||
def osx_sort_names(self, names):
|
def osx_sort_names(self, names):
|
||||||
|
@ -235,12 +235,12 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
wmi = __import__('wmi', globals(), locals(), [], -1)
|
wmi = __import__('wmi', globals(), locals(), [], -1)
|
||||||
c = wmi.WMI(find_classes=False)
|
c = wmi.WMI(find_classes=False)
|
||||||
for drive in c.Win32_DiskDrive():
|
for drive in c.Win32_DiskDrive():
|
||||||
if self.windows_match_device(drive, 'WINDOWS_CARD_A_MEM'):
|
if self.windows_match_device(drive, 'WINDOWS_MAIN_MEM') and not drives.get('main', None):
|
||||||
drives['carda'] = self.windows_get_drive_prefix(drive)
|
|
||||||
elif self.windows_match_device(drive, 'WINDOWS_CARD_B_MEM'):
|
|
||||||
drives['cardb'] = self.windows_get_drive_prefix(drive)
|
|
||||||
elif self.windows_match_device(drive, 'WINDOWS_MAIN_MEM'):
|
|
||||||
drives['main'] = self.windows_get_drive_prefix(drive)
|
drives['main'] = self.windows_get_drive_prefix(drive)
|
||||||
|
elif self.windows_match_device(drive, 'WINDOWS_CARD_A_MEM') and not drives.get('carda', None):
|
||||||
|
drives['carda'] = self.windows_get_drive_prefix(drive)
|
||||||
|
elif self.windows_match_device(drive, 'WINDOWS_CARD_B_MEM') and not drives.get('cardb', None):
|
||||||
|
drives['cardb'] = self.windows_get_drive_prefix(drive)
|
||||||
if 'main' in drives.keys() and 'carda' in drives.keys() and \
|
if 'main' in drives.keys() and 'carda' in drives.keys() and \
|
||||||
'cardb' in drives.keys():
|
'cardb' in drives.keys():
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user