From 9830bc4ef91bbb1d8ef9ce91dfcf7eb8db814c8b Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 4 May 2024 21:13:27 +0200 Subject: support thumbnails for files in sub-directories --- bin/pyggle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/pyggle b/bin/pyggle index 3a818b8..231087a 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -268,8 +268,9 @@ class Thumbnail: except FileNotFoundError: pass - self.thumbname = f".thumbnails/{filename}" - if not filename.lower().endswith((".jpeg", ".jpg")): + thumb_filename = filename.replace("/", "-") + self.thumbname = f".thumbnails/{thumb_filename}" + if not self.thumbname.lower().endswith((".jpeg", ".jpg")): self.thumbname += ".jpg" im = rotate_image(im, self.exif_tag) -- cgit v1.2.3