mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Basic USBMS driver for the T1, since it seems to be very different from previous readers
This commit is contained in:
parent
f4bad2fe9d
commit
26e227eb86
@ -555,7 +555,7 @@ from calibre.devices.irexdr.driver import IREXDR1000, IREXDR800
|
|||||||
from calibre.devices.jetbook.driver import JETBOOK, MIBUK, JETBOOK_MINI
|
from calibre.devices.jetbook.driver import JETBOOK, MIBUK, JETBOOK_MINI
|
||||||
from calibre.devices.kindle.driver import KINDLE, KINDLE2, KINDLE_DX
|
from calibre.devices.kindle.driver import KINDLE, KINDLE2, KINDLE_DX
|
||||||
from calibre.devices.nook.driver import NOOK, NOOK_COLOR
|
from calibre.devices.nook.driver import NOOK, NOOK_COLOR
|
||||||
from calibre.devices.prs505.driver import PRS505
|
from calibre.devices.prs505.driver import PRS505, PRST1
|
||||||
from calibre.devices.user_defined.driver import USER_DEFINED
|
from calibre.devices.user_defined.driver import USER_DEFINED
|
||||||
from calibre.devices.android.driver import ANDROID, S60, WEBOS
|
from calibre.devices.android.driver import ANDROID, S60, WEBOS
|
||||||
from calibre.devices.nokia.driver import N770, N810, E71X, E52
|
from calibre.devices.nokia.driver import N770, N810, E71X, E52
|
||||||
@ -657,7 +657,7 @@ plugins += [
|
|||||||
KINDLE2,
|
KINDLE2,
|
||||||
KINDLE_DX,
|
KINDLE_DX,
|
||||||
NOOK, NOOK_COLOR,
|
NOOK, NOOK_COLOR,
|
||||||
PRS505,
|
PRS505, PRST1,
|
||||||
ANDROID, S60, WEBOS,
|
ANDROID, S60, WEBOS,
|
||||||
N770,
|
N770,
|
||||||
E71X,
|
E71X,
|
||||||
|
@ -19,7 +19,8 @@ class PRS505(USBMS):
|
|||||||
|
|
||||||
name = 'SONY Device Interface'
|
name = 'SONY Device Interface'
|
||||||
gui_name = 'SONY Reader'
|
gui_name = 'SONY Reader'
|
||||||
description = _('Communicate with all the Sony eBook readers.')
|
description = _('Communicate with Sony eBook readers older than the'
|
||||||
|
' PRST1.')
|
||||||
author = 'Kovid Goyal'
|
author = 'Kovid Goyal'
|
||||||
supported_platforms = ['windows', 'osx', 'linux']
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
path_sep = '/'
|
path_sep = '/'
|
||||||
@ -31,14 +32,13 @@ class PRS505(USBMS):
|
|||||||
CAN_DO_DEVICE_DB_PLUGBOARD = True
|
CAN_DO_DEVICE_DB_PLUGBOARD = True
|
||||||
|
|
||||||
VENDOR_ID = [0x054c] #: SONY Vendor Id
|
VENDOR_ID = [0x054c] #: SONY Vendor Id
|
||||||
PRODUCT_ID = [0x031e, 0x05c2]
|
PRODUCT_ID = [0x031e]
|
||||||
BCD = [0x229, 0x1000, 0x22a, 0x31a, 0x226]
|
BCD = [0x229, 0x1000, 0x22a, 0x31a]
|
||||||
|
|
||||||
VENDOR_NAME = 'SONY'
|
VENDOR_NAME = 'SONY'
|
||||||
WINDOWS_MAIN_MEM = re.compile(
|
WINDOWS_MAIN_MEM = re.compile(
|
||||||
r'(PRS-(505|500|300))|'
|
r'(PRS-(505|500|300))|'
|
||||||
r'(PRS-((700[#/])|((6|9|3)(0|5)0&)))|'
|
r'(PRS-((700[#/])|((6|9|3)(0|5)0&)))'
|
||||||
r'(PRS-T1&)'
|
|
||||||
)
|
)
|
||||||
WINDOWS_CARD_A_MEM = re.compile(
|
WINDOWS_CARD_A_MEM = re.compile(
|
||||||
r'(PRS-(505|500)[#/]\S+:MS)|'
|
r'(PRS-(505|500)[#/]\S+:MS)|'
|
||||||
@ -299,3 +299,34 @@ class PRS505(USBMS):
|
|||||||
f.write(metadata.thumbnail[-1])
|
f.write(metadata.thumbnail[-1])
|
||||||
debug_print('Cover uploaded to: %r'%cpath)
|
debug_print('Cover uploaded to: %r'%cpath)
|
||||||
|
|
||||||
|
class PRST1(USBMS):
|
||||||
|
name = 'SONY PRST1 and newer Device Interface'
|
||||||
|
gui_name = 'SONY Reader'
|
||||||
|
description = _('Communicate with Sony PRST1 and newer eBook readers')
|
||||||
|
author = 'Kovid Goyal'
|
||||||
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
|
|
||||||
|
FORMATS = ['epub', 'lrf', 'lrx', 'rtf', 'pdf', 'txt']
|
||||||
|
VENDOR_ID = [0x054c] #: SONY Vendor Id
|
||||||
|
PRODUCT_ID = [0x05c2]
|
||||||
|
BCD = [0x226]
|
||||||
|
|
||||||
|
VENDOR_NAME = 'SONY'
|
||||||
|
WINDOWS_MAIN_MEM = re.compile(
|
||||||
|
r'(PRS-T1&)'
|
||||||
|
)
|
||||||
|
|
||||||
|
THUMBNAIL_HEIGHT = 217
|
||||||
|
SCAN_FROM_ROOT = True
|
||||||
|
EBOOK_DIR_MAIN = __appname__
|
||||||
|
|
||||||
|
|
||||||
|
def windows_filter_pnp_id(self, pnp_id):
|
||||||
|
return '_LAUNCHER' in pnp_id or '_SETTING' in pnp_id
|
||||||
|
|
||||||
|
def get_carda_ebook_dir(self, for_upload=False):
|
||||||
|
if for_upload:
|
||||||
|
return __appname__
|
||||||
|
return self.EBOOK_DIR_CARD_A
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user