Changed KeyValue for Ipptc KeyTag from value to values for Keywords. Thank you Helge.Privat for the change.
svn: r16811
This commit is contained in:
parent
ba42df2706
commit
90616376ed
@ -37,6 +37,7 @@ from fractions import Fraction
|
||||
# Gtk/ Gramps modules
|
||||
#------------------------------------------------
|
||||
import gtk
|
||||
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
# import the pyexiv2 library classes for this addon
|
||||
@ -97,10 +98,14 @@ _DATAMAP = [ImageArtist, ImageCopyright, ImageDateTime,
|
||||
|
||||
_allmonths = list( [_dd.short_months[i], _dd.long_months[i], i] for i in range(1, 13) )
|
||||
|
||||
"""
|
||||
This addon/ gramplet will display an image's metadata if the python library,
|
||||
pyexiv2-0.2.0 or greater, is installed? You may download it from:
|
||||
|
||||
http://tilloy.net/dev/pyexiv2/
|
||||
"""
|
||||
class MediaMetadata(Gramplet):
|
||||
"""
|
||||
Displays the Media Metadata if present ?
|
||||
"""
|
||||
|
||||
def init(self):
|
||||
|
||||
self.exif_column_width = 15
|
||||
@ -450,13 +455,13 @@ class MediaMetadata(Gramplet):
|
||||
self.ValueType = None
|
||||
if "Exif" in KeyTag:
|
||||
try:
|
||||
KeyValue = self.plugin_image[KeyTag].value
|
||||
self.ValueType = 0
|
||||
|
||||
except KeyError:
|
||||
KeyValue = self.plugin_image[KeyTag].raw_value
|
||||
self.ValueType = 1
|
||||
|
||||
except KeyError:
|
||||
KeyValue = self.plugin_image[KeyTag].value
|
||||
self.ValueType = 0
|
||||
|
||||
except ValueError:
|
||||
KeyValue = ""
|
||||
|
||||
@ -466,7 +471,7 @@ class MediaMetadata(Gramplet):
|
||||
# Iptc KeyTag
|
||||
elif "Iptc" in KeyTag:
|
||||
try:
|
||||
KeyValue = self.plugin_image[KeyTag].value
|
||||
KeyValue = self.plugin_image[KeyTag].values
|
||||
|
||||
except KeyError:
|
||||
KeyValue = "[not set]"
|
||||
@ -476,7 +481,6 @@ class MediaMetadata(Gramplet):
|
||||
|
||||
except AttributeError:
|
||||
KeyValue = ""
|
||||
|
||||
return KeyValue
|
||||
|
||||
#------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user