fix: check video id for validity before passing to yt-dlp and extractor
This commit is contained in:
@@ -338,6 +338,9 @@ def videos(data):
|
||||
|
||||
time_start = time()
|
||||
|
||||
if len(data) < 4 or len(data[3]) != 11:
|
||||
return send(400, {"error": "No valid video id."})
|
||||
|
||||
if ythdd_globals.config['general']['cache'] and data[3] in ythdd_globals.video_cache:
|
||||
if ythdd_globals.video_cache[data[3]]['cacheTime'] + 3 * 60 * 60 > time():
|
||||
response = ythdd_globals.video_cache[data[3]]
|
||||
|
||||
Reference in New Issue
Block a user