mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:53:40 +02:00
re-organize SONY drivers
This commit is contained in:
parent
b2e252f805
commit
51e20a8764
5 changed files with 24 additions and 42 deletions
|
|
@ -411,8 +411,7 @@ def set_metadata(self, stream, mi, type):
|
|||
from calibre.devices.kindle.driver import KINDLE, KINDLE2, KINDLE_DX
|
||||
from calibre.devices.nook.driver import NOOK
|
||||
from calibre.devices.prs500.driver import PRS500
|
||||
from calibre.devices.prs505.driver import PRS505
|
||||
from calibre.devices.prs700.driver import PRS700
|
||||
from calibre.devices.prs505.driver import PRS505, PRS700
|
||||
from calibre.devices.android.driver import ANDROID
|
||||
from calibre.devices.eslick.driver import ESLICK
|
||||
from calibre.devices.nuut2.driver import NUUT2
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class PRS505(CLI, Device):
|
|||
name = 'PRS-300/505 Device Interface'
|
||||
gui_name = 'SONY Pocket Edition'
|
||||
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']
|
||||
path_sep = '/'
|
||||
|
||||
|
|
@ -202,3 +202,22 @@ def write_card_prefix(prefix, listid):
|
|||
self.report_progress(1.0, _('Sending metadata to device...'))
|
||||
|
||||
|
||||
class PRS700(PRS505):
|
||||
|
||||
name = 'PRS-600/700 Device Interface'
|
||||
description = _('Communicate with the Sony PRS-600/700 eBook reader.')
|
||||
author = 'Kovid Goyal and John Schember'
|
||||
gui_name = 'SONY Touch edition'
|
||||
supported_platforms = ['windows', 'osx', 'linux']
|
||||
|
||||
BCD = [0x31a]
|
||||
|
||||
WINDOWS_MAIN_MEM = re.compile('PRS-((700/)|(600&))')
|
||||
WINDOWS_CARD_A_MEM = re.compile(r'PRS-((700/\S+:)|(600_))MS')
|
||||
WINDOWS_CARD_B_MEM = re.compile(r'PRS-((700/\S+:)|(600_))SD')
|
||||
|
||||
OSX_MAIN_MEM = re.compile(r'Sony PRS-((700/[^:]+)|(600)) Media')
|
||||
OSX_CARD_A_MEM = re.compile(r'Sony PRS-((700/[^:]+:)|(600 ))MS Media')
|
||||
OSX_CARD_B_MEM = re.compile(r'Sony PRS-((700/[^:]+:)|(600 ))SD Media')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
'''
|
||||
Device driver for the SONY PRS-700
|
||||
'''
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Device driver for the SONY PRS-700
|
||||
'''
|
||||
|
||||
from calibre.devices.prs505.driver import PRS505
|
||||
import re
|
||||
|
||||
class PRS700(PRS505):
|
||||
|
||||
name = 'PRS-600/700 Device Interface'
|
||||
description = _('Communicate with the Sony PRS-600/700 eBook reader.')
|
||||
author = _('Kovid Goyal and John Schember')
|
||||
gui_name = 'SONY Touch edition'
|
||||
supported_platforms = ['windows', 'osx', 'linux']
|
||||
|
||||
BCD = [0x31a]
|
||||
|
||||
WINDOWS_MAIN_MEM = re.compile('PRS-((700/)|(600&))')
|
||||
WINDOWS_CARD_A_MEM = re.compile(r'PRS-((700/\S+:)|(600_))MS')
|
||||
WINDOWS_CARD_B_MEM = re.compile(r'PRS-((700/\S+:)|(600_))SD')
|
||||
|
||||
OSX_MAIN_MEM = re.compile(r'Sony PRS-((700/[^:]+)|(600)) Media')
|
||||
OSX_CARD_A_MEM = re.compile(r'Sony PRS-((700/[^:]+:)|(600 ))MS Media')
|
||||
OSX_CARD_B_MEM = re.compile(r'Sony PRS-((700/[^:]+:)|(600 ))SD Media')
|
||||
|
||||
|
||||
|
|
@ -65,8 +65,10 @@ def __call__(self):
|
|||
ans.add(tuple(dev))
|
||||
return ans
|
||||
|
||||
linux_scanner = None
|
||||
|
||||
linux_scanner = LinuxScanner()
|
||||
if islinux:
|
||||
linux_scanner = LinuxScanner()
|
||||
|
||||
class DeviceScanner(object):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue