Complete integration of the new thumb_video_delay parameter.

This commit is contained in:
jdn06
2015-02-23 23:20:25 +01:00
parent 5e9307cd39
commit 2d25a07047
2 changed files with 4 additions and 2 deletions

View File

@@ -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)

View File

@@ -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