This commit is contained in:
Kovid Goyal 2009-12-07 10:25:25 -07:00
parent 6486e2bee0
commit 6678af3a25
3 changed files with 5 additions and 3 deletions

View File

@ -98,7 +98,7 @@ def debug_device_driver():
errors = {} errors = {}
success = False success = False
for dev in connected_devices: for dev in connected_devices:
print 'Device possibly connected:', dev print 'Device possibly connected:', dev.__class__.name
print 'Trying to open device...', print 'Trying to open device...',
try: try:
dev.open() dev.open()

View File

@ -13,6 +13,7 @@ from calibre.devices.usbms.driver import USBMS
class NOOK(USBMS): class NOOK(USBMS):
name = 'Nook Device Interface' name = 'Nook Device Interface'
gui_name = _('The Nook')
description = _('Communicate with the Nook eBook reader.') description = _('Communicate with the Nook eBook reader.')
author = 'John Schember' author = 'John Schember'
supported_platforms = ['windows', 'linux', 'osx'] supported_platforms = ['windows', 'linux', 'osx']

View File

@ -784,8 +784,9 @@ class DeviceGUI(object):
if _auto_ids != []: if _auto_ids != []:
for id in _auto_ids: for id in _auto_ids:
if specific_format == None: if specific_format == None:
formats = [f.lower() for f in self.library_view.model().db.formats(id, index_is_id=True).split(',')] formats = self.library_view.model().db.formats(id, index_is_id=True)
formats = formats if formats != None else [] formats = formats.split(',') if formats is not None else []
formats = [f.lower().strip() for f in formats]
if list(set(formats).intersection(available_input_formats())) != [] and list(set(self.device_manager.device_class.settings().format_map).intersection(available_output_formats())) != []: if list(set(formats).intersection(available_input_formats())) != [] and list(set(self.device_manager.device_class.settings().format_map).intersection(available_output_formats())) != []:
auto.append(id) auto.append(id)
else: else: