From 48c7a8e8d95d3bf4dffb421b730e832eb2c0ffbb Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 22 Nov 2025 20:27:56 -0800 Subject: [PATCH] Stop thumbnail generator attemps after 60 seconds of input file. --- etiquette/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etiquette/helpers.py b/etiquette/helpers.py index de125ea..b848fcd 100644 --- a/etiquette/helpers.py +++ b/etiquette/helpers.py @@ -289,7 +289,7 @@ def generate_video_thumbnail(filepath, width, height, special={}) -> PIL.Image: if 'timestamp' in special: timestamp_choices = [float(special['timestamp'])] else: - timestamp_choices = list(range(0, int(duration), 3)) + timestamp_choices = list(range(0, min(int(duration), 60), 3)) image = None for this_time in timestamp_choices: