mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Possible fix for iriver detection on windows
This commit is contained in:
parent
7fdcba0b24
commit
a0935b190c
@ -13,4 +13,11 @@ base_dir = os.path.join(src_dir, 'calibre')
|
|||||||
|
|
||||||
vipy.session.initialize(project_name='calibre', src_dir=src_dir,
|
vipy.session.initialize(project_name='calibre', src_dir=src_dir,
|
||||||
project_dir=project_dir, base_dir=base_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
|
EOFPY
|
||||||
|
@ -13,7 +13,7 @@ class IRIVER_STORY(USBMS):
|
|||||||
name = 'Iriver Story Device Interface'
|
name = 'Iriver Story Device Interface'
|
||||||
gui_name = 'Iriver Story'
|
gui_name = 'Iriver Story'
|
||||||
description = _('Communicate with the Iriver Story reader.')
|
description = _('Communicate with the Iriver Story reader.')
|
||||||
author = _('Kovid Goyal')
|
author = 'Kovid Goyal'
|
||||||
supported_platforms = ['windows', 'osx', 'linux']
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
|
|
||||||
# Ordered list of supported formats
|
# Ordered list of supported formats
|
||||||
@ -35,7 +35,7 @@ class IRIVER_STORY(USBMS):
|
|||||||
|
|
||||||
SUPPORTS_SUB_DIRS = True
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
def windows_sort_drives(self, drives):
|
def windows_open_callback(self, drives):
|
||||||
main = drives.get('main', None)
|
main = drives.get('main', None)
|
||||||
card = drives.get('carda', None)
|
card = drives.get('carda', None)
|
||||||
if card and main and card < main:
|
if card and main and card < main:
|
||||||
|
@ -295,7 +295,7 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
|
|
||||||
# This is typically needed when the device has the same
|
# This is typically needed when the device has the same
|
||||||
# WINDOWS_MAIN_MEM and WINDOWS_CARD_A_MEM in which case
|
# 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
|
# will incorrectly identify the main mem as carda
|
||||||
# See for example the driver for the Nook
|
# See for example the driver for the Nook
|
||||||
if 'main' not in drives and 'carda' in drives:
|
if 'main' not in drives and 'carda' in drives:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user