Try to fix macOS tests

This commit is contained in:
Bastian Germann 2018-10-16 20:32:30 +02:00
parent 62636c5b27
commit ddc66fcd2f
1 changed files with 3 additions and 1 deletions

View File

@ -25,13 +25,15 @@ on a media file and obtain information related to the requested media.
"""
from pymediainfo import MediaInfo
from subprocess import check_output
import sys
class MediaInfoWrapper(object):
@staticmethod
def parse(filename):
if MediaInfo.can_parse():
# FIXME: library loading on macOS
if sys.platform != 'darwin' and MediaInfo.can_parse():
return MediaInfo.parse(filename)
else:
xml = check_output(['mediainfo', '-f', '--Output=XML', '--Inform=OLDXML', filename])