Fix video_thumbnail not checking if probe failed before using it.

This commit is contained in:
voussoir 2020-09-20 18:31:55 -07:00
parent 2accb5c961
commit 18e1849fcf

View file

@ -157,7 +157,8 @@ def generate_video_thumbnail(filepath, outfile, width, height, **special):
if not os.path.isfile(filepath):
raise FileNotFoundError(filepath)
probe = constants.ffmpeg.probe(filepath)
if not probe.video:
if not probe or not probe.video:
return False
size = imagetools.fit_into_bounds(