Add driver for upgraded PRS 500

This commit is contained in:
Kovid Goyal 2009-11-29 11:23:47 -07:00
parent 44ca967ecc
commit a711689635
2 changed files with 12 additions and 10 deletions

View File

@ -433,9 +433,9 @@ plugins += [
KINDLE, KINDLE,
KINDLE2, KINDLE2,
KINDLE_DX, KINDLE_DX,
PRS500,
PRS505, PRS505,
PRS700, PRS700,
PRS500,
ANDROID, ANDROID,
CYBOOK_OPUS, CYBOOK_OPUS,
COOL_ER, COOL_ER,

View File

@ -23,24 +23,24 @@ class PRS505(CLI, Device):
name = 'PRS-300/505 Device Interface' name = 'PRS-300/505 Device Interface'
gui_name = 'SONY Pocket Edition' gui_name = 'SONY Pocket Edition'
description = _('Communicate with the Sony PRS-300/505 eBook reader.') description = _('Communicate with the Sony PRS-300/505/500 eBook reader.')
author = _('Kovid Goyal and John Schember') author = _('Kovid Goyal and John Schember')
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
FORMATS = ['epub', 'lrf', 'lrx', 'rtf', 'pdf', 'txt'] FORMATS = ['epub', 'lrf', 'lrx', 'rtf', 'pdf', 'txt']
VENDOR_ID = [0x054c] #: SONY Vendor Id VENDOR_ID = [0x054c] #: SONY Vendor Id
PRODUCT_ID = [0x031e] #: Product Id for the PRS 300 and 505 PRODUCT_ID = [0x031e] #: Product Id for the PRS 300/505/new 500
BCD = [0x229, 0x1000] BCD = [0x229, 0x1000, 0x22a]
VENDOR_NAME = 'SONY' VENDOR_NAME = 'SONY'
WINDOWS_MAIN_MEM = re.compile('PRS-(505|300)') WINDOWS_MAIN_MEM = re.compile('PRS-(505|300|500)')
WINDOWS_CARD_A_MEM = re.compile(r'PRS-505/\S+:MS') WINDOWS_CARD_A_MEM = re.compile(r'PRS-(505|500)/\S+:MS')
WINDOWS_CARD_B_MEM = re.compile(r'PRS-505/\S+:SD') WINDOWS_CARD_B_MEM = re.compile(r'PRS-(505|500)/\S+:SD')
OSX_MAIN_MEM = re.compile(r'Sony PRS-(((505|300)/[^:]+)|(300)) Media') OSX_MAIN_MEM = re.compile(r'Sony PRS-(((505|300|500)/[^:]+)|(300)) Media')
OSX_CARD_A_MEM = re.compile(r'Sony PRS-505/[^:]+:MS Media') OSX_CARD_A_MEM = re.compile(r'Sony PRS-(505|500)/[^:]+:MS Media')
OSX_CARD_B_MEM = re.compile(r'Sony PRS-505/[^:]+:SD Media') OSX_CARD_B_MEM = re.compile(r'Sony PRS-(505|500)/[^:]+:SD Media')
MAIN_MEMORY_VOLUME_LABEL = 'Sony Reader Main Memory' MAIN_MEMORY_VOLUME_LABEL = 'Sony Reader Main Memory'
STORAGE_CARD_VOLUME_LABEL = 'Sony Reader Storage Card' STORAGE_CARD_VOLUME_LABEL = 'Sony Reader Storage Card'
@ -196,3 +196,5 @@ class PRS505(CLI, Device):
write_card_prefix(self._card_b_prefix, 2) write_card_prefix(self._card_b_prefix, 2)
self.report_progress(1.0, _('Sending metadata to device...')) self.report_progress(1.0, _('Sending metadata to device...'))