From ae1124f8bde59eab7c4f4b1d6492c5b7a1daf2b2 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 16 Oct 2015 17:38:39 +0100 Subject: [PATCH] bible --- openlp/plugins/bibles/bibleplugin.py | 8 +++++--- openlp/plugins/bibles/lib/db.py | 10 ---------- openlp/plugins/bibles/lib/manager.py | 5 ----- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index 59203e682..e95cc0875 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -178,12 +178,14 @@ class BiblePlugin(Plugin): def uses_theme(self, theme): """ - Called to find out if the bible plugin is currently using a theme. Returns ``True`` if the theme is being used, - otherwise returns ``False``. + Called to find out if the bible plugin is currently using a theme. Returns ``1`` if the theme is being used, + otherwise returns ``0``. :param theme: The theme """ - return str(self.settings_tab.bible_theme) == theme + if str(self.settings_tab.bible_theme) == theme: + return 1 + return 0 def rename_theme(self, old_theme, new_theme): """ diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 1f5986ad7..e6ca14027 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -476,16 +476,6 @@ class BibleDB(QtCore.QObject, Manager, RegistryProperties): self.save_meta('language_id', language_id) return language_id - def is_old_database(self): - """ - Returns ``True`` if it is a bible database, which has been created prior to 1.9.6. - """ - try: - self.session.query(Book).all() - except: - return True - return False - def dump_bible(self): """ Utility debugging method to dump the contents of a bible. diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 742671ac1..8b7cfa18e 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -129,11 +129,6 @@ class BibleManager(RegistryProperties): bible.session.close() delete_file(os.path.join(self.path, filename)) continue - # Find old database versions. - if bible.is_old_database(): - self.old_bible_databases.append([filename, name]) - bible.session.close() - continue log.debug('Bible Name: "%s"', name) self.db_cache[name] = bible # Look to see if lazy load bible exists and get create getter.