forked from openlp/openlp
correct import check
This commit is contained in:
parent
7f513fc58c
commit
bb4f2fd113
@ -311,12 +311,8 @@ class MediaController(object):
|
||||
isValid = self.check_file_type(controller, display)
|
||||
display.override[u'theme'] = u''
|
||||
display.override[u'video'] = True
|
||||
if not controller.media_info.is_background:
|
||||
controller.media_info.start_time = display.serviceItem.start_time
|
||||
controller.media_info.end_time = display.serviceItem.end_time
|
||||
else:
|
||||
controller.media_info.start_time = 0
|
||||
controller.media_info.end_time = 0
|
||||
controller.media_info.start_time = display.serviceItem.start_time
|
||||
controller.media_info.end_time = display.serviceItem.end_time
|
||||
elif controller.previewDisplay:
|
||||
display = controller.previewDisplay
|
||||
isValid = self.check_file_type(controller, display)
|
||||
|
@ -31,8 +31,16 @@ from datetime import datetime
|
||||
try:
|
||||
import vlc
|
||||
vlc_available = bool(vlc.get_default_instance())
|
||||
except (ImportError, WindowsError):
|
||||
except (ImportError, NameError):
|
||||
vlc_available = False
|
||||
except OSError, e:
|
||||
if sys.platform.startswith('win'):
|
||||
if isinstance(e, WindowsError) and e.winerror == 126:
|
||||
vlc_available = False
|
||||
else:
|
||||
raise
|
||||
else:
|
||||
raise
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import Receiver
|
||||
|
Loading…
Reference in New Issue
Block a user