diff --git a/openlp/plugins/bibles/lib/common.py b/openlp/plugins/bibles/lib/common.py index cd9b5cf35..4ba985842 100644 --- a/openlp/plugins/bibles/lib/common.py +++ b/openlp/plugins/bibles/lib/common.py @@ -166,8 +166,6 @@ class BibleCommon(object): """ A common ancestor for bible download sites. """ - global log - log = logging.getLogger(u'BibleCommon') log.info(u'BibleCommon') def _get_web_text(self, urlstring, proxyurl): diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 67c71ca10..be4112a54 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -59,7 +59,7 @@ class BibleDB(QtCore.QObject): ``config`` The configuration object, passed in from the plugin. """ - log.info(u'BibleDBimpl loaded') + log.info(u'BibleDB loaded') QtCore.QObject.__init__(self) if u'path' not in kwargs: raise KeyError(u'Missing keyword argument "path".') diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 1cf92e4d2..d00c1f88a 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -35,6 +35,8 @@ from common import BibleCommon, SearchResults from db import BibleDB from openlp.plugins.bibles.lib.models import Book +log = logging.getLogger(__name__) + class HTTPBooks(object): cursor = None @@ -119,9 +121,7 @@ class HTTPBooks(object): class BGExtract(BibleCommon): - global log - log = logging.getLogger(u'BibleHTTPMgr(BG_extract)') - log.info(u'BG_extract loaded') + log.info(u'%s BGExtract loaded', __name__) def __init__(self, proxyurl=None): log.debug(u'init %s', proxyurl) @@ -184,7 +184,7 @@ class BGExtract(BibleCommon): return SearchResults(bookname, chapter, bible) class CWExtract(BibleCommon): - log.info(u'%s loaded', __name__) + log.info(u'%s CWExtract loaded', __name__) def __init__(self, proxyurl=None): log.debug(u'init %s', proxyurl) @@ -229,7 +229,7 @@ class CWExtract(BibleCommon): class HTTPBible(BibleDB): - log.info(u'%s loaded', __name__) + log.info(u'%s HTTPBible loaded' , __name__) def __init__(self, parent, **kwargs): """ diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 44d37c4c4..c0a3bde35 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -43,7 +43,6 @@ class BibleListView(BaseListWithDnD): def resizeEvent(self, event): self.parent.onListViewResize(event.size().width(), event.size().width()) - class BibleMediaItem(MediaManagerItem): """ This is the custom media manager item for Bibles. @@ -435,7 +434,7 @@ class BibleMediaItem(MediaManagerItem): raw_slides = [] raw_footer = [] bible_text = u'' - self.service_item.autoPreviewAllowed = True + service_item.autoPreviewAllowed = True #If we want to use a 2nd translation / version bible2 = u'' if self.SearchTabWidget.currentIndex() == 0: @@ -471,12 +470,12 @@ class BibleMediaItem(MediaManagerItem): verse_text = self.formatVerse(old_chapter, chapter, verse, u'', u'') old_chapter = chapter footer = u'%s (%s %s)' % (book, version, copyright) - #If not found throws and error so add.s + #If not found add to footer if footer not in raw_footer: raw_footer.append(footer) if bible2: footer = u'%s (%s %s)' % (book, version, copyright) - #If not found throws and error so add.s + #If not found add to footer if footer not in raw_footer: raw_footer.append(footer) bible_text = u'%s %s \n\n %s %s' % \ diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 0750a467e..c4b9ef16a 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -144,7 +144,7 @@ class CustomMediaItem(MediaManagerItem): item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] else: item_id = self.remoteCustom - self.service_item.autoPreviewAllowed = True + service_item.autoPreviewAllowed = True customSlide = self.parent.custommanager.get_custom(item_id) title = customSlide.title credit = customSlide.credits diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index d538c70af..e418ee44e 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -144,7 +144,7 @@ class ImageMediaItem(MediaManagerItem): items = self.ListView.selectedIndexes() if items: service_item.title = self.trUtf8('Image(s)') - self.service_item.autoPreviewAllowed = True + service_item.autoPreviewAllowed = True for item in items: bitem = self.ListView.item(item.row()) filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString()) diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index 640de1cb3..532a50410 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -27,6 +27,7 @@ import logging from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.plugins.media.lib import MediaMediaItem +from PyQt4.phonon import Phonon class MediaPlugin(Plugin): global log