Fix an error in changing date/ time display into human_value in the model display area.
svn: r17600
This commit is contained in:
parent
42b6bcdb87
commit
6aa091a305
@ -520,27 +520,17 @@ class EditExifMetadata(Gramplet):
|
|||||||
for KeyTag in metadatatags:
|
for KeyTag in metadatatags:
|
||||||
if LesserVersion: # prior to v0.2.0
|
if LesserVersion: # prior to v0.2.0
|
||||||
label = metadata.tagDetails(KeyTag)[0]
|
label = metadata.tagDetails(KeyTag)[0]
|
||||||
if KeyTag in ("Exif.Image.DateTime",
|
human_value = self.plugin_image.interpretedExifValue(KeyTag)
|
||||||
"Exif.Photo.DateTimeOriginal",
|
|
||||||
"Exif.Photo.DateTimeDigitized"):
|
# add to model display...
|
||||||
human_value = _format_datetime(self.plugin_image[KeyTag])
|
|
||||||
else:
|
|
||||||
human_value = self.plugin_image.interpretedExifValue(KeyTag)
|
|
||||||
self.model.add((label, human_value))
|
self.model.add((label, human_value))
|
||||||
|
|
||||||
else: # v0.2.0 and above
|
else: # v0.2.0 and above
|
||||||
try:
|
try:
|
||||||
tag = self.plugin_image[KeyTag]
|
tag = self.plugin_image[KeyTag]
|
||||||
|
human_value = tag.human_value
|
||||||
|
|
||||||
# display the date as the user has set in preferences...
|
# add to model display...
|
||||||
if KeyTag in ("Exif.Image.DateTime",
|
|
||||||
"Exif.Photo.DateTimeOriginal",
|
|
||||||
"Exif.Photo.DateTimeDigitized"):
|
|
||||||
human_value = _format_datetime(tag.value)
|
|
||||||
|
|
||||||
# display anything else...
|
|
||||||
else:
|
|
||||||
human_value = tag.human_value
|
|
||||||
self.model.add((tag.label, human_value))
|
self.model.add((tag.label, human_value))
|
||||||
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user