photos: try/catch exifs, captions and blacklist
diff --git a/plugins/photos/photos.py b/plugins/photos/photos.py
index 2c6966a..25027bc 100644
--- a/plugins/photos/photos.py
+++ b/plugins/photos/photos.py
@@ -492,13 +492,20 @@
logger.info('photos: Gallery detected: {}'.format(rel_gallery))
dir_photo = os.path.join('photos', rel_gallery.lower())
dir_thumb = os.path.join('photos', rel_gallery.lower())
- exifs = read_notes(os.path.join(dir_gallery, 'exif.txt'),
- msg='photos: No EXIF for gallery')
- captions = read_notes(os.path.join(dir_gallery, 'captions.txt'), msg='photos: No captions for gallery')
- blacklist = read_notes(os.path.join(dir_gallery, 'blacklist.txt'), msg='photos: No blacklist for gallery')
- content_gallery = []
+ try:
+ exifs = read_notes(os.path.join(dir_gallery, 'exif.txt'),
+ msg='photos: No EXIF for gallery')
+ captions = read_notes(os.path.join(dir_gallery, 'captions.txt'),
+ msg='photos: No captions for gallery')
+ blacklist = read_notes(os.path.join(dir_gallery, 'blacklist.txt'),
+ msg='photos: No blacklist for gallery')
+ except Exception as e:
+ logger.debug('photos: exception {}'.format(pprint.pformat(e)))
+
+ content_gallery = []
title = gallery['title']
+
for pic in sorted(os.listdir(dir_gallery)):
if pic.startswith('.'):
continue