fixup! Fix edit metadata

This commit is contained in:
Cédric Leporcq 2022-07-27 03:16:25 +02:00
parent 501ab496ff
commit f21331889c
1 changed files with 7 additions and 2 deletions

View File

@ -1179,8 +1179,6 @@ class Collection(SortMedias):
media.metadata['longitude'] = coordinates['longitude']
media.set_location_from_coordinates(loc)
# Update database
self.db.add_file_data(media.metadata)
# Update exif data
if key in (
'date_original',
@ -1206,6 +1204,13 @@ class Collection(SortMedias):
)
else:
result = exif.set_key_values(key, value)
# Update checksum
media.metadata['checksum'] = utils.checksum(file_path)
# Update database
self.db.add_file_data(media.metadata)
if result:
self.summary.append('update', True, file_path)
else: