fix: remove undefined video_path reference in upload route
Previously, app.py:123-125 tried to use and before was defined. This caused NameError and 500 Internal Server Error when users uploaded new videos and pressed 'start analysis'. The code block (lines 122-125) was duplicate logic - the later transcoding at line 138 already handles the height check. Fixes: # (Issue reference not provided)
This commit is contained in:
1 parent
37e2d3e296
commit
b1dd06e650
1 file changed
-4
@@ -119,10 +119,6 @@ def upload():
|
||||
|
||||
model_configs, class_filters = _parse_model_configs(request.form)
|
||||
|
||||
# For upload reuse, only transcode if video is taller than 720p
|
||||
meta = probe_video(video_path)
|
||||
if meta["height"] > 720:
|
||||
video_path = resize_video_to_max_height(video_path, max_height=720)
|
||||
if not model_configs:
|
||||
return "No models selected", 400
|
||||
|
||||
|
||||
Reference in new issue
Block a user