diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-06-18 22:59:46 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-06-18 22:59:46 +0200 |
commit | c33ab5cfb517b35885b3b76b0ca118d6e33adc28 (patch) | |
tree | 36f431014f2ddc66616aa46311ee1d852212dc4d | |
parent | 4824c7d4d65ec6738e05eaf71d516f5ec68a6b15 (diff) |
add external thumbnail support, e.g. for video files
-rwxr-xr-x | bin/pyggle | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |