diff --git a/ordigi/collection.py b/ordigi/collection.py index b4f2e9a..68b0459 100644 --- a/ordigi/collection.py +++ b/ordigi/collection.py @@ -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: