From 1bb130d37b8ea2acf4b131611295d91b59291923 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Sun, 22 Dec 2013 21:40:48 -0500 Subject: [PATCH] Fix testing for duration in video metadata --- scanner/PhotoAlbum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index d82d025..373d866 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -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"]