summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-04 21:13:27 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-04 21:13:27 +0200
commit9830bc4ef91bbb1d8ef9ce91dfcf7eb8db814c8b (patch)
treee9fdbc4d33b7688d277e187ed3c2449244271bc3 /bin
parenta150b7aa4b83c1725128ecb6470b8cbf2d5e0214 (diff)
support thumbnails for files in sub-directories
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pyggle5
1 files changed, 3 insertions, 2 deletions
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)