openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #17153
[Merge] lp:~mzibricky/openlp/bug-963894 into lp:openlp
matysek has proposed merging lp:~mzibricky/openlp/bug-963894 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #963894 in OpenLP: "openlp not starting on Mac if vlc not available"
https://bugs.launchpad.net/openlp/+bug/963894
For more details, see:
https://code.launchpad.net/~mzibricky/openlp/bug-963894/+merge/124550
--
https://code.launchpad.net/~mzibricky/openlp/bug-963894/+merge/124550
Your team OpenLP Core is requested to review the proposed merge of lp:~mzibricky/openlp/bug-963894 into lp:openlp.
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py 2012-09-08 18:39:15 +0000
+++ openlp/core/ui/media/mediacontroller.py 2012-09-15 12:03:22 +0000
@@ -28,6 +28,7 @@
import logging
import os
+import sys
from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, Receiver, translate
@@ -105,8 +106,13 @@
AppLocation.get_directory(AppLocation.AppDir),
u'core', u'ui', u'media')
for filename in os.listdir(controller_dir):
+ # TODO vlc backend is not yet working on Mac OS X.
+ # For now just ignore vlc backend on Mac OS X.
+ if sys.platform == 'darwin' and filename == 'vlcplayer.py':
+ log.warn(u'Disabling vlc media player')
+ continue
if filename.endswith(u'player.py') and not \
- filename == 'media_player.py':
+ filename == 'media_player.py': # TODO This file was renamed.
path = os.path.join(controller_dir, filename)
if os.path.isfile(path):
modulename = u'openlp.core.ui.media.' + \
@@ -114,7 +120,9 @@
log.debug(u'Importing controller %s', modulename)
try:
__import__(modulename, globals(), locals(), [])
- except ImportError:
+ # On some platforms importing vlc.py might cause
+ # also OSError exceptions. (e.g. Mac OS X)
+ except (ImportError, OSError):
log.warn(u'Failed to import %s on path %s',
modulename, path)
controller_classes = MediaPlayer.__subclasses__()
Follow ups