forked from openlp/openlp
Try to fix macOS tests
This commit is contained in:
parent
62636c5b27
commit
ddc66fcd2f
|
@ -25,13 +25,15 @@ on a media file and obtain information related to the requested media.
|
||||||
"""
|
"""
|
||||||
from pymediainfo import MediaInfo
|
from pymediainfo import MediaInfo
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class MediaInfoWrapper(object):
|
class MediaInfoWrapper(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse(filename):
|
def parse(filename):
|
||||||
if MediaInfo.can_parse():
|
# FIXME: library loading on macOS
|
||||||
|
if sys.platform != 'darwin' and MediaInfo.can_parse():
|
||||||
return MediaInfo.parse(filename)
|
return MediaInfo.parse(filename)
|
||||||
else:
|
else:
|
||||||
xml = check_output(['mediainfo', '-f', '--Output=XML', '--Inform=OLDXML', filename])
|
xml = check_output(['mediainfo', '-f', '--Output=XML', '--Inform=OLDXML', filename])
|
||||||
|
|
Loading…
Reference in New Issue