Spaces:
Runtime error
Runtime error
imperialwool
commited on
Commit
•
fb5f502
1
Parent(s):
6e39dc6
Update routes/ytApi/getPreview.py
Browse files
routes/ytApi/getPreview.py
CHANGED
@@ -15,7 +15,7 @@ def getPreview(request):
|
|
15 |
error_code = answer['ytdlp-code']
|
16 |
|
17 |
duration = helpers.getFromRequest(request, "duration")
|
18 |
-
try: duration = int(duration) if ((isinstance(duration, str) and duration.isnumeric()) or isinstance(duration, int)) and int(duration) <=
|
19 |
except Exception as e:
|
20 |
print(e)
|
21 |
duration = 45
|
|
|
15 |
error_code = answer['ytdlp-code']
|
16 |
|
17 |
duration = helpers.getFromRequest(request, "duration")
|
18 |
+
try: duration = int(duration) if ((isinstance(duration, str) and duration.isnumeric()) or isinstance(duration, int)) and int(duration) <= 240 else 45
|
19 |
except Exception as e:
|
20 |
print(e)
|
21 |
duration = 45
|