Possible fix for iriver detection on windows

This commit is contained in:
Kovid Goyal 2009-12-19 09:22:48 -07:00
parent 7fdcba0b24
commit a0935b190c
3 changed files with 10 additions and 3 deletions

View File

@ -13,4 +13,11 @@ base_dir = os.path.join(src_dir, 'calibre')
vipy.session.initialize(project_name='calibre', src_dir=src_dir,
project_dir=project_dir, base_dir=base_dir)
def recipe_title_callback(raw):
return eval(raw.decode('utf-8'))
vipy.session.add_content_browser('.r', ',r', 'Recipe',
vipy.session.glob_based_iterator(os.path.join(project_dir, 'resources', 'recipes', '*.recipe')),
vipy.session.regexp_based_matcher(r'title\s*=\s*(?P<title>.+)', 'title', recipe_title_callback))
EOFPY

View File

@ -13,7 +13,7 @@ class IRIVER_STORY(USBMS):
name = 'Iriver Story Device Interface'
gui_name = 'Iriver Story'
description = _('Communicate with the Iriver Story reader.')
author = _('Kovid Goyal')
author = 'Kovid Goyal'
supported_platforms = ['windows', 'osx', 'linux']
# Ordered list of supported formats
@ -35,7 +35,7 @@ class IRIVER_STORY(USBMS):
SUPPORTS_SUB_DIRS = True
def windows_sort_drives(self, drives):
def windows_open_callback(self, drives):
main = drives.get('main', None)
card = drives.get('carda', None)
if card and main and card < main:

View File

@ -295,7 +295,7 @@ class Device(DeviceConfig, DevicePlugin):
# This is typically needed when the device has the same
# WINDOWS_MAIN_MEM and WINDOWS_CARD_A_MEM in which case
# if the devices is connected without a crad, the above
# if the devices is connected without a card, the above
# will incorrectly identify the main mem as carda
# See for example the driver for the Nook
if 'main' not in drives and 'carda' in drives: