From c33ab5cfb517b35885b3b76b0ca118d6e33adc28 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Jun 2021 22:59:46 +0200 Subject: add external thumbnail support, e.g. for video files --- bin/pyggle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/pyggle b/bin/pyggle index 1c29295..4a2e74a 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -573,7 +573,13 @@ if __name__ == "__main__": try: im = Image.open(filename) except PIL.UnidentifiedImageError: - continue + try: + im = Image.open(f".thumbnail.for.{filename}") + except FileNotFoundError: + continue + except PIL.UnidentifiedImageError: + # perhaps raise a warning? + continue thumbnails.append( Thumbnail(filename, im, size=args.size, with_gps=args.with_nominatim) -- cgit v1.2.3