Browse Source

Complete integration of the new thumb_video_delay parameter.

pull/143/head
jdn06 11 years ago
parent
commit
2d25a07047
  1. 1
      sigal/gallery.py
  2. 5
      sigal/image.py

1
sigal/gallery.py

@ -122,6 +122,7 @@ class Media(UnicodeMixin):
try:
generator(self.src_path, self.thumb_path,
self.settings['thumb_size'],
self.settings['thumb_video_delay'],
fit=self.settings['thumb_fit'])
except Exception as e:
self.logger.error('Failed to generate thumbnail: %s', e)

5
sigal/image.py

@ -112,7 +112,7 @@ def generate_image(source, outname, settings, options=None):
save_image(img, outname, outformat, options=options, autoconvert=True)
def generate_thumbnail(source, outname, box, fit=True, options=None):
def generate_thumbnail(source, outname, box, delay, fit=True, options=None):
"""Create a thumbnail image."""
logger = logging.getLogger(__name__)
@ -151,7 +151,8 @@ def process_image(filepath, outpath, settings):
if settings['make_thumbs']:
thumb_name = os.path.join(outpath, get_thumb(settings, filename))
generate_thumbnail(outname, thumb_name, settings['thumb_size'],
fit=settings['thumb_fit'], options=options)
settings['thumb_video_delay'], fit=settings['thumb_fit'],
options=options)
except Exception as e:
logger.info('Failed to process: %r', e)
return Status.FAILURE

Loading…
Cancel
Save