From f21331889c46f8ad0459995382fe617ee57e86be Mon Sep 17 00:00:00 2001 From: Cedric Leporcq Date: Wed, 27 Jul 2022 03:16:25 +0200 Subject: [PATCH] fixup! Fix edit metadata --- ordigi/collection.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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: