chang efield name
This commit is contained in:
parent
95b611e61f
commit
1bafd2480a
1 changed files with 5 additions and 5 deletions
|
@ -84,16 +84,16 @@ class image_classifier:
|
||||||
def append_people_to_exif(self, people):
|
def append_people_to_exif(self, people):
|
||||||
if self.is_json(self.iptc_info.get('user_comment')):
|
if self.is_json(self.iptc_info.get('user_comment')):
|
||||||
data = json.loads(self.iptc_info['user_comment'])
|
data = json.loads(self.iptc_info['user_comment'])
|
||||||
if 'PeopleDetected' not in data:
|
if 'Person shown' not in data:
|
||||||
data['PeopleDetected'] = list()
|
data['Person shown'] = list()
|
||||||
else:
|
else:
|
||||||
data = dict()
|
data = dict()
|
||||||
if self.exif_iptc_infoinfo.get('user_comment'):
|
if self.exif_iptc_infoinfo.get('user_comment'):
|
||||||
data["previous_user_comment"]=self.iptc_info.get('user_comment')
|
data["previous_user_comment"]=self.iptc_info.get('user_comment')
|
||||||
data['PeopleDetected'] = list()
|
data['Person shown'] = list()
|
||||||
for person in people:
|
for person in people:
|
||||||
if person not in data['PeopleDetected']:
|
if person not in data['Person shown']:
|
||||||
data['PeopleDetected'].append(person)
|
data['Person shown'].append(person)
|
||||||
self._log.debug(f"New 'user_comment': {json.dumps(data, indent=2)}")
|
self._log.debug(f"New 'user_comment': {json.dumps(data, indent=2)}")
|
||||||
self.iptc_info.set("user_comment", json.dumps(data))
|
self.iptc_info.set("user_comment", json.dumps(data))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue