Generate missing thumbnails from the resized image if possible (ref #211)

This commit is contained in:
Simon Conseil
2016-08-01 23:24:00 +02:00
parent 8f8b6b1acd
commit 239d7d0a1f

View File

@@ -117,9 +117,10 @@ class Media(UnicodeMixin):
generator = video.generate_thumbnail
self.logger.debug('Generating thumbnail for %r', self)
path = (self.dst_path if os.path.exists(self.dst_path)
else self.src_path)
try:
generator(self.src_path, self.thumb_path,
self.settings['thumb_size'],
generator(path, self.thumb_path, self.settings['thumb_size'],
self.settings['thumb_video_delay'],
fit=self.settings['thumb_fit'])
except Exception as e: