From 8edce3cb1e347285b980773b541dd46e2c1f9bf2 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 6 Oct 2015 19:10:00 +0200 Subject: More python insanity --- scanner/PhotoAlbum.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scanner/PhotoAlbum.py') diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index 437687e..372ef32 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -145,6 +145,8 @@ class Photo(object): exif = {} for tag, value in info.items(): decoded = TAGS.get(tag, tag) + if (isinstance(value, tuple) or isinstance(value, list)) and (isinstance(decoded, str) or isinstance(decoded, unicode)) and decoded.startswith("DateTime") and len(value) >= 1: + value = value[0] if isinstance(value, str) or isinstance(value, unicode): value = value.strip().partition("\x00")[0] if (isinstance(decoded, str) or isinstance(decoded, unicode)) and decoded.startswith("DateTime"): -- cgit v1.2.3-59-g8ed1b