From 0d163a2a7d090a2b252a8630fdc094ec81d05901 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 3 Oct 2010 15:29:38 +0100 Subject: [PATCH] Use 'device_db' for device database updates. Change the sony driver as appropriate. Remove the tweak. --- resources/default_tweaks.py | 10 ---------- src/calibre/devices/prs505/driver.py | 8 +++----- src/calibre/gui2/preferences/plugboard.py | 1 + 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 17ed0eeea7..98cdccf164 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -180,13 +180,3 @@ content_server_wont_display = [''] # level sorts, and if you are seeing a slowdown, reduce the value of this tweak. maximum_resort_levels = 5 - -# Tell the Sony driver to apply the plugboard specified by the given format -# before writing to its database. This can be used to change the title, etc, -# in the DB, and therefore what the Sony displays. -# Example: -# sony_db_use_plugboard_format='epub' -# Apply the epub plugboard before writing to the Sony DB. -# Default: '' -sony_db_use_plugboard_format='' - diff --git a/src/calibre/devices/prs505/driver.py b/src/calibre/devices/prs505/driver.py index e69851253a..ca8c09245c 100644 --- a/src/calibre/devices/prs505/driver.py +++ b/src/calibre/devices/prs505/driver.py @@ -167,10 +167,8 @@ class PRS505(USBMS): debug_print('PRS505: finished rebuild_collections') def use_plugboard_ext(self): - ext = tweaks.get('sony_db_use_plugboard_format', None) - return ext + return 'device_db' def set_plugboard(self, pb): - if tweaks.get('sony_db_use_plugboard_format', None): - debug_print('PRS505: use plugboard', pb) - self.plugboard = pb \ No newline at end of file + debug_print('PRS505: use plugboard', pb) + self.plugboard = pb \ No newline at end of file diff --git a/src/calibre/gui2/preferences/plugboard.py b/src/calibre/gui2/preferences/plugboard.py index 5bc05a5874..4781921073 100644 --- a/src/calibre/gui2/preferences/plugboard.py +++ b/src/calibre/gui2/preferences/plugboard.py @@ -60,6 +60,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form): for w in metadata_writers(): for f in w.file_types: self.formats.append(f) + self.formats.append('device_db') self.formats.sort() self.formats.insert(1, plugboard_any_format_value) self.new_format.addItems(self.formats)