mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Add support for the storage card in the EB600
This commit is contained in:
parent
593db09fdf
commit
316071b848
@ -8,7 +8,8 @@ from calibre.devices.usbms.driver import USBMS
|
|||||||
|
|
||||||
class EB600(USBMS):
|
class EB600(USBMS):
|
||||||
# Ordered list of supported formats
|
# Ordered list of supported formats
|
||||||
FORMATS = ['epub', 'pdf']
|
FORMATS = ['epub', 'prc', 'chm', 'djvu', 'html', 'rtf', 'txt', 'pdf']
|
||||||
|
DRM_FORMATS = ['prc', 'mobi', 'html', 'pdf', 'txt']
|
||||||
|
|
||||||
VENDOR_ID = [0x1f85]
|
VENDOR_ID = [0x1f85]
|
||||||
PRODUCT_ID = [0x1688]
|
PRODUCT_ID = [0x1688]
|
||||||
@ -16,7 +17,7 @@ class EB600(USBMS):
|
|||||||
|
|
||||||
VENDOR_NAME = 'NETRONIX'
|
VENDOR_NAME = 'NETRONIX'
|
||||||
WINDOWS_MAIN_MEM = 'EBOOK'
|
WINDOWS_MAIN_MEM = 'EBOOK'
|
||||||
WINDOWS_CARD_MEM = 'CARD_STORAGE'
|
WINDOWS_CARD_MEM = 'EBOOK'
|
||||||
|
|
||||||
OSX_MAIN_MEM = 'EB600 Internal Storage Media'
|
OSX_MAIN_MEM = 'EB600 Internal Storage Media'
|
||||||
OSX_CARD_MEM = 'EB600 Card Storage Media'
|
OSX_CARD_MEM = 'EB600 Card Storage Media'
|
||||||
@ -28,4 +29,13 @@ class EB600(USBMS):
|
|||||||
EBOOK_DIR_CARD = ''
|
EBOOK_DIR_CARD = ''
|
||||||
SUPPORTS_SUB_DIRS = True
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
def windows_sort_drives(self, drives):
|
||||||
|
main = drives['main']
|
||||||
|
card = drives['card']
|
||||||
|
if card and main and card < main:
|
||||||
|
drives['main'] = card
|
||||||
|
drives['card'] = main
|
||||||
|
|
||||||
|
return drives
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,6 +174,14 @@ class Device(_Device):
|
|||||||
|
|
||||||
return prefix
|
return prefix
|
||||||
|
|
||||||
|
def windows_sort_drives(self, drives):
|
||||||
|
'''
|
||||||
|
Called to disambiguate main memory and storage card for devices that
|
||||||
|
do not distinguish between them on the basis of `WINDOWS_CARD_NAME`.
|
||||||
|
For e.g.: The EB600
|
||||||
|
'''
|
||||||
|
return drives
|
||||||
|
|
||||||
def open_windows(self):
|
def open_windows(self):
|
||||||
time.sleep(6)
|
time.sleep(6)
|
||||||
drives = {}
|
drives = {}
|
||||||
@ -188,11 +196,14 @@ class Device(_Device):
|
|||||||
if 'main' in drives.keys() and 'card' in drives.keys():
|
if 'main' in drives.keys() and 'card' in drives.keys():
|
||||||
break
|
break
|
||||||
|
|
||||||
|
drives = self.windows_sort_drives(drives)
|
||||||
self._main_prefix = drives.get('main')
|
self._main_prefix = drives.get('main')
|
||||||
self._card_prefix = drives.get('card')
|
self._card_prefix = drives.get('card')
|
||||||
|
|
||||||
if not self._main_prefix:
|
if not self._main_prefix:
|
||||||
raise DeviceError(_('Unable to detect the %s disk drive. Try rebooting.') % self.__class__.__name__)
|
raise DeviceError(
|
||||||
|
_('Unable to detect the %s disk drive. Try rebooting.') %
|
||||||
|
self.__class__.__name__)
|
||||||
|
|
||||||
def get_osx_mountpoints(self, raw=None):
|
def get_osx_mountpoints(self, raw=None):
|
||||||
if raw is None:
|
if raw is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user