From 5814bd16d520b779dce68d69241c940921080a4f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 24 May 2021 22:21:06 +0200 Subject: datetime: fall back to mtime if not available from EXIF --- bin/pyggle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pyggle b/bin/pyggle index 7b1dfb7..51993b0 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -163,7 +163,7 @@ class Thumbnail: self.exif_tag["Image DateTime"].values, "%Y:%m:%d %H:%M:%S" ) except (KeyError, ValueError): - pass + dt = datetime.fromtimestamp(os.path.getmtime(self.filename)) if dt: self.exif_dt = dt -- cgit v1.2.3