From bf098af98b92999d96bbe14e9c1ebe1cad144e05 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 6 Jul 2011 17:46:48 -0600 Subject: [PATCH] Metadata plugboards: Allow use of device_db special format with individual device drivers --- src/calibre/gui2/preferences/plugboard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/preferences/plugboard.py b/src/calibre/gui2/preferences/plugboard.py index cf632c04c0..f0a1a5fd04 100644 --- a/src/calibre/gui2/preferences/plugboard.py +++ b/src/calibre/gui2/preferences/plugboard.py @@ -241,7 +241,8 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form): if self.current_format != plugboard_any_format_value and \ self.current_device in self.device_to_formats_map: allowable_formats = self.device_to_formats_map[self.current_device] - if self.current_format not in allowable_formats: + if (self.current_format not in allowable_formats and + self.current_format != 'device_db'): error_dialog(self, '', _('The {0} device does not support the {1} format.'). format(self.current_device, self.current_format), @@ -358,5 +359,5 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form): if __name__ == '__main__': from PyQt4.Qt import QApplication app = QApplication([]) - test_widget('Import/Export', 'plugboards') + test_widget('Import/Export', 'Plugboard')