mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #5900 (Alex reader from spring design is reconized as N516 and send books to wrong location)
This commit is contained in:
parent
b958545a8a
commit
62c652869a
@ -11,6 +11,10 @@ import re
|
|||||||
|
|
||||||
from calibre.devices.usbms.driver import USBMS
|
from calibre.devices.usbms.driver import USBMS
|
||||||
|
|
||||||
|
def is_alex(device_info):
|
||||||
|
return device_info[3] == u'Linux 2.6.28 with pxa3xx_u2d' and \
|
||||||
|
device_info[4] == u'Seleucia Disk'
|
||||||
|
|
||||||
class N516(USBMS):
|
class N516(USBMS):
|
||||||
|
|
||||||
name = 'N516 driver'
|
name = 'N516 driver'
|
||||||
@ -34,6 +38,9 @@ class N516(USBMS):
|
|||||||
EBOOK_DIR_MAIN = 'e_book'
|
EBOOK_DIR_MAIN = 'e_book'
|
||||||
SUPPORTS_SUB_DIRS = True
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
def can_handle(self, device_info, debug=False):
|
||||||
|
return not is_alex(device_info)
|
||||||
|
|
||||||
class THEBOOK(N516):
|
class THEBOOK(N516):
|
||||||
name = 'The Book driver'
|
name = 'The Book driver'
|
||||||
gui_name = 'The Book'
|
gui_name = 'The Book'
|
||||||
@ -61,6 +68,9 @@ class ALEX(N516):
|
|||||||
EBOOK_DIR_MAIN = 'eBooks'
|
EBOOK_DIR_MAIN = 'eBooks'
|
||||||
SUPPORTS_SUB_DIRS = True
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
def can_handle(self, device_info, debug=False):
|
||||||
|
return is_alex(device_info)
|
||||||
|
|
||||||
class AZBOOKA(ALEX):
|
class AZBOOKA(ALEX):
|
||||||
|
|
||||||
name = 'Azbooka driver'
|
name = 'Azbooka driver'
|
||||||
@ -74,6 +84,9 @@ class AZBOOKA(ALEX):
|
|||||||
|
|
||||||
EBOOK_DIR_MAIN = ''
|
EBOOK_DIR_MAIN = ''
|
||||||
|
|
||||||
|
def can_handle(self, device_info, debug=False):
|
||||||
|
return not is_alex(device_info)
|
||||||
|
|
||||||
|
|
||||||
class EB511(USBMS):
|
class EB511(USBMS):
|
||||||
name = 'Elonex EB 511 driver'
|
name = 'Elonex EB 511 driver'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user