Skip to content

Commit

Permalink
Fix ISO value handling
Browse files Browse the repository at this point in the history
- #370 was caused by an ISO
  value being returned as a tuple (50,50). Check if we have a tuple and,
  if so, take only the first element.
  • Loading branch information
jgodfrey committed Feb 9, 2024
1 parent 67a3e3f commit f4f034e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/picframe/get_image_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ def get_exif(self, key):
for iso in iso_keys:
val = self.__get_if_exist(iso)
if val:
# If ISO is returned as a tuple, take the first element
if type(val) is tuple:
val = val[0]
break
else:
val = self.__get_if_exist(key)
Expand Down

0 comments on commit f4f034e

Please sign in to comment.