Find macOS problem

This commit is contained in:
Bastian Germann 2018-10-16 21:07:31 +02:00
parent 2e39304a1b
commit 45a1c3d3f1
2 changed files with 1 additions and 3 deletions

View File

@ -25,7 +25,6 @@ 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):
@ -38,4 +37,5 @@ class MediaInfoWrapper(object):
xml = check_output(['mediainfo', '-f', '--Output=XML', '--Inform=OLDXML', filename])
if not xml.startswith(b'<?xml'):
xml = check_output(['mediainfo', '-f', '--Output=XML', filename])
print(xml)
return MediaInfo(xml)

View File

@ -44,7 +44,5 @@ class TestMediainfoWrapper(TestCase):
# WHEN the media data is retrieved
results = MediaInfoWrapper.parse(full_path)
assert 'fail' == results
# THEN you can determine the run time
assert results.tracks[0].duration == test_data[1], 'The correct duration is returned for ' + test_data[0]