diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-02-15 18:24:55 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-02-15 18:24:55 +0100 |
commit | 106f2606d13bb63231cec64327f2182717d6440b (patch) | |
tree | bf67690236139df2e6c226dd19b2f8dcde23921e /src | |
parent | b7a68a833a996bf490c602d6ff318fbf73997329 (diff) | |
download | pyexiv2-106f2606d13bb63231cec64327f2182717d6440b.tar.gz |
Update the list of keys when inserting a new tag.
Diffstat (limited to 'src')
-rw-r--r-- | src/pyexiv2/metadata.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pyexiv2/metadata.py b/src/pyexiv2/metadata.py index c6e90f6..f868096 100644 --- a/src/pyexiv2/metadata.py +++ b/src/pyexiv2/metadata.py @@ -180,6 +180,8 @@ class ImageMetadata(object): raise TypeError('Expecting an ExifTag') self._image._setExifTagValue(tag.key, tag.raw_value) self._tags['exif'][tag.key] = tag + if tag.key not in self.exif_keys: + self._keys['exif'].append(tag.key) tag.metadata = self def _set_exif_tag_value(self, key, value): @@ -201,6 +203,8 @@ class ImageMetadata(object): raise TypeError('Expecting an IptcTag') self._image._setIptcTagValues(tag.key, tag.raw_values) self._tags['iptc'][tag.key] = tag + if tag.key not in self.iptc_keys: + self._keys['iptc'].append(tag.key) tag.metadata = self def _set_iptc_tag_values(self, key, values): @@ -231,6 +235,8 @@ class ImageMetadata(object): elif type == 'LangAlt': self._image._setXmpTagLangAltValue(tag.key, tag.raw_value) self._tags['xmp'][tag.key] = tag + if tag.key not in self.xmp_keys: + self._keys['xmp'].append(tag.key) tag.metadata = self def _set_xmp_tag_value(self, key, value): |