forked from openlp/openlp
shorter solution
This commit is contained in:
parent
9dc7d1a795
commit
9668b22f85
@ -26,6 +26,7 @@
|
||||
###############################################################################
|
||||
|
||||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
@ -52,16 +53,12 @@ except OSError, e:
|
||||
raise
|
||||
|
||||
if VLC_AVAILABLE:
|
||||
try:
|
||||
# Older versions of vlc fail here.
|
||||
vlcInstance = vlc.Instance()
|
||||
vlcInstance.media_player_new()
|
||||
except AttributeError:
|
||||
VLC_AVAILABLE = False
|
||||
version = u'0.0.0'
|
||||
try:
|
||||
version = vlc.libvlc_get_version()
|
||||
finally:
|
||||
except:
|
||||
version = u'0.0.0'
|
||||
if LooseVersion(version) < '1.1.0':
|
||||
VLC_AVAILABLE = False
|
||||
log.debug(u'VLC could not be loaded: %s' % version)
|
||||
|
||||
AUDIO_EXT = [
|
||||
|
Loading…
Reference in New Issue
Block a user