openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #17169
[Merge] lp:~mzibricky/openlp/bug-963894 into lp:openlp
matysek has proposed merging lp:~mzibricky/openlp/bug-963894 into lp:openlp.
Requested reviews:
Tim Bentley (trb143)
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/124554
The line 23 is removed. Put there comment because I didn't want to touch any other code for 1.9.12. But at the moment it irrelevant.
--
https://code.launchpad.net/~mzibricky/openlp/bug-963894/+merge/124554
Your team OpenLP Core is subscribed to branch 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 16:51:20 +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,12 @@
AppLocation.get_directory(AppLocation.AppDir),
u'core', u'ui', u'media')
for filename in os.listdir(controller_dir):
- if filename.endswith(u'player.py') and not \
- filename == 'media_player.py':
+ # 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'):
path = os.path.join(controller_dir, filename)
if os.path.isfile(path):
modulename = u'openlp.core.ui.media.' + \
@@ -114,7 +119,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