diff --git a/openlp/plugins/bibles/forms/importwizardform.py b/openlp/plugins/bibles/forms/importwizardform.py index b1eafcd61..72d6b9f42 100644 --- a/openlp/plugins/bibles/forms/importwizardform.py +++ b/openlp/plugins/bibles/forms/importwizardform.py @@ -322,8 +322,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): Load the list of Crosswalk and BibleGateway bibles. """ #Load and store Crosswalk Bibles - filepath = AppLocation.get_directory(AppLocation.PluginsDir) - filepath = os.path.join(filepath, u'bibles', u'resources') + filepath = os.path.join(AppLocation.get_section_data_path( + self.bibleplugin.settingsSection), u'resources') try: self.web_bible_list[WebDownload.Crosswalk] = {} books_file = open( diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 47d9ffdd2..97983e72c 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -59,6 +59,7 @@ class BibleDB(QtCore.QObject): """ log.info(u'BibleDB loaded') QtCore.QObject.__init__(self) + self.bible_plugin = parent if u'path' not in kwargs: raise KeyError(u'Missing keyword argument "path".') if u'name' not in kwargs and u'file' not in kwargs: diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 223d428af..3bff9264c 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -56,8 +56,8 @@ class HTTPBooks(object): """ if HTTPBooks.cursor is None: filepath = os.path.join( - AppLocation.get_directory(AppLocation.PluginsDir), u'bibles', - u'resources', u'httpbooks.sqlite') + AppLocation.get_section_data_path(u'bibles'), u'resources', + u'httpbooks.sqlite') conn = sqlite3.connect(filepath) HTTPBooks.cursor = conn.cursor() return HTTPBooks.cursor @@ -288,8 +288,7 @@ class CWExtract(BibleCommon): ``chapter`` Chapter number """ - log.debug(u'get_bible_chapter %s,%s,%s', - version, bookname, chapter) + log.debug(u'get_bible_chapter %s,%s,%s', version, bookname, chapter) urlbookname = bookname.replace(u' ', u'-') chapter_url = u'http://www.biblestudytools.com/%s/%s/%s.html' % \ (version, urlbookname.lower(), chapter) diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py index b4a2a2aa1..6c1342c6f 100644 --- a/openlp/plugins/bibles/lib/osis.py +++ b/openlp/plugins/bibles/lib/osis.py @@ -68,9 +68,8 @@ class OSISBible(BibleDB): self.trans_regex = re.compile(r'(.*?)') self.spaces_regex = re.compile(r'([ ]{2,})') self.books = {} - filepath = os.path.join( - AppLocation.get_directory(AppLocation.PluginsDir), u'bibles', - u'resources', u'osisbooks.csv') + filepath = os.path.join(AppLocation.get_section_data_path( + self.bible_plugin.settingsSection), u'resources', u'osisbooks.csv') fbibles = None try: fbibles = open(filepath, u'r')