Changed CSV variable, only write Exif tags that hava values to fill in.

This commit is contained in:
2020-03-10 21:53:43 +01:00
parent c19a94374e
commit 92b08170f2
2 changed files with 6 additions and 4 deletions

View File

@@ -61,7 +61,9 @@ class Photo:
# Create metadata object with all data to write
for key, value in zip(keys, values):
metadata[key] = pyexiv2.ExifTag(key, value)
# Only create object if there is anything to fill with
if value is not None:
metadata[key] = pyexiv2.ExifTag(key, value)
# Write Exif tags to file, if not in dry-run mode
if dry_run == 'True':