From 65dba564dded902ae8103e5f5a6dc5d64e4fb1a0 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 19 Jun 2024 21:52:32 +0200 Subject: fix handling of existing CR2 previews --- bin/pyggle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/pyggle b/bin/pyggle index 5f41b27..a2e3348 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -370,9 +370,10 @@ class Thumbnail: ) self.jpegname = jpegname rotate_preview(jpegname, self.exif_tag) - have_thumbnail.pop(self.jpegname, None) except FileNotFoundError: pass + elif have_thumbnail.pop(f".thumbnails/{thumb_filename}.p.jpg", None): + self.jpegname = f".thumbnails/{thumb_filename}.p.jpg" if args.with_detail_page and 0: self.average_color = im.resize((1, 1)).getpixel((0, 0)) -- cgit v1.2.3