diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-05-16 19:25:07 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-05-16 19:25:07 +0200 |
commit | 0d1d51ab612b22ad6439000590b512502d18a791 (patch) | |
tree | c409613fe920e09063e1ff377044e007713ae6b8 | |
parent | ae3883ee92ac931e710de553c12240ad3283dfa0 (diff) |
fall back to "Image DateTime" if DateTimeOriginal is unavailable
-rwxr-xr-x | bin/pyggle | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -158,7 +158,12 @@ class Thumbnail: self.exif_tag["Image DateTimeOriginal"].values, "%Y:%m:%d %H:%M:%S" ) except (KeyError, ValueError): - pass + try: + dt = datetime.strptime( + self.exif_tag["Image DateTime"].values, "%Y:%m:%d %H:%M:%S" + ) + except (KeyError, ValueError): + pass if dt: self.exif_dt = dt |