Fix testing for duration in video metadata

patches
Jerome Charaoui 2013-12-22 21:40:48 -05:00
parent 2df2730cd3
commit 1bb130d37b
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ class Photo(object):
if 'codec_type' in s and s['codec_type'] == 'video':
self._attributes["mediaType"] = "video"
self._attributes["size"] = (int(s["width"]), int(s["height"]))
if s["duration"]:
if "duration" in s:
self._attributes["duration"] = s["duration"]
if "tags" in s and "rotate" in s["tags"]:
self._attributes["rotate"] = s["tags"]["rotate"]