feat: storyboard generation (json, webvtt) and proxy

adds support for video storyboard extraction, generation and proxying
This commit is contained in:
2025-10-15 00:03:45 +02:00
parent c760104d70
commit b0845d723a
6 changed files with 218 additions and 33 deletions

View File

@@ -45,6 +45,21 @@ def thumbnailProxy(received_request):
return response
def storyboardProxy(received_request):
# will proxy storyboards
prefix = "https://i.ytimg.com/"
sqp = request.args.get("sqp")
sigh = request.args.get("sigh")
if sqp is None or sigh is None:
return Response(json.dumps({"status": "error", "error": "Request lacks the sqp, sigh params (or both)."}), mimetype="application/json", status=400)
sb = requests.get(prefix + "sb/" + received_request, headers=ythdd_globals.getHeaders(caller='proxy'), params={"sqp": sqp, "sigh": sigh}, stream=True)
sb.raw.decode_content = True
response = Response(sb.raw, mimetype=sb.headers['content-type'], status=sb.status_code)
return response
def ggphtProxy(received_request):
prefix = "https://yt3.ggpht.com/"