fix 500 error

pull/213/head
Aevann 2023-10-12 01:10:56 +03:00
parent f851dbebb8
commit 51b1d5d644
1 changed files with 7 additions and 3 deletions

View File

@ -1976,9 +1976,13 @@ def start_orgy(v):
orgy_type = 'file'
data = normalized_link
#not deduped, cuz cron checks local file, it can't check the url cuz of referrer restriction
video_info = ffmpeg.probe(data)
seconds = float(video_info['streams'][0]['duration'])
end_utc = int(time.time() + seconds)
try:
video_info = ffmpeg.probe(data)
except:
pass
else:
seconds = float(video_info['streams'][0]['duration'])
end_utc = int(time.time() + seconds)
else:
abort(400)