Fix #963894: disable vlc backend completely for osx.

This commit is contained in:
Martin Zibricky 2012-09-15 13:16:58 +02:00
parent f51f19e2b9
commit 41980a3a46
1 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,7 @@
import logging
import os
import sys
from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, Receiver, translate
@ -105,6 +106,10 @@ class MediaController(object):
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':
continue
if filename.endswith(u'player.py') and not \
filename == 'media_player.py':
path = os.path.join(controller_dir, filename)
@ -115,7 +120,7 @@ class MediaController(object):
try:
__import__(modulename, globals(), locals(), [])
# On some platforms importing vlc.py might cause
# also OSError exception. (e.g. Mac OS X)
# also OSError exceptions. (e.g. Mac OS X)
except (ImportError, OSError):
log.warn(u'Failed to import %s on path %s',
modulename, path)