forked from MarseyWorld/MarseyWorld
fix 500 error
parent
c9dd229b55
commit
79301d7be3
|
@ -170,6 +170,7 @@ def process_video(file, v):
|
|||
|
||||
try:
|
||||
video_info = ffmpeg.probe(old)['streams']
|
||||
codec = None
|
||||
for stream in video_info:
|
||||
if stream["codec_type"] == "video":
|
||||
codec = stream['codec_name']
|
||||
|
@ -179,6 +180,10 @@ def process_video(file, v):
|
|||
os.remove(old)
|
||||
abort(400, "Something went wrong processing your video on our end. Please try uploading it to https://pomf2.lain.la and post the link instead.")
|
||||
|
||||
if not codec:
|
||||
os.remove(old)
|
||||
abort(400, "Something went wrong processing your video on our end. Please try uploading it to https://pomf2.lain.la and post the link instead.")
|
||||
|
||||
is_reencoding = False
|
||||
if codec != 'h264':
|
||||
copyfile(old, new)
|
||||
|
|
Loading…
Reference in New Issue