More python insanity
This commit is contained in:
parent
e4244d086d
commit
1a2b14bb47
@ -165,6 +165,8 @@ class Photo(object):
|
|||||||
exif = {}
|
exif = {}
|
||||||
for tag, value in info.items():
|
for tag, value in info.items():
|
||||||
decoded = TAGS.get(tag, tag)
|
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):
|
if isinstance(value, str) or isinstance(value, unicode):
|
||||||
value = value.strip().partition("\x00")[0]
|
value = value.strip().partition("\x00")[0]
|
||||||
if (isinstance(decoded, str) or isinstance(decoded, unicode)) and decoded.startswith("DateTime"):
|
if (isinstance(decoded, str) or isinstance(decoded, unicode)) and decoded.startswith("DateTime"):
|
||||||
|
Loading…
Reference in New Issue
Block a user