gh-32 Add `Creation Date (und-US)` to list of exif fields to read to support older versions of exiftool
This commit is contained in:
parent
5c3c87e1da
commit
ca04d3ca48
|
@ -97,7 +97,7 @@ class Video(Media):
|
||||||
# If the time is not found in EXIF we update EXIF
|
# If the time is not found in EXIF we update EXIF
|
||||||
seconds_since_epoch = min(os.path.getmtime(source), os.path.getctime(source)) # noqa
|
seconds_since_epoch = min(os.path.getmtime(source), os.path.getctime(source)) # noqa
|
||||||
exif_data = self.get_exif()
|
exif_data = self.get_exif()
|
||||||
for key in ['Creation Date', 'Media Create Date']:
|
for key in ['Creation Date', 'Creation Date \(und-US\)', 'Media Create Date']: # noqa
|
||||||
date = re.search('%s +: +([0-9: ]+)' % key, exif_data)
|
date = re.search('%s +: +([0-9: ]+)' % key, exif_data)
|
||||||
if(date is not None):
|
if(date is not None):
|
||||||
date_string = date.group(1)
|
date_string = date.group(1)
|
||||||
|
|
|
@ -52,7 +52,6 @@ def test_get_coordinate_longitude():
|
||||||
assert coordinate == -119.9558, coordinate
|
assert coordinate == -119.9558, coordinate
|
||||||
|
|
||||||
def test_get_date_taken():
|
def test_get_date_taken():
|
||||||
raise SkipTest('gh-32 this test fails on travisci')
|
|
||||||
video = Video(helper.get_file('video.mov'))
|
video = Video(helper.get_file('video.mov'))
|
||||||
date_taken = video.get_date_taken()
|
date_taken = video.get_date_taken()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue