feat: videoplayback proxying

adds support for proxying videos through the instance
the support is configurable, and disabled by default
This commit is contained in:
2025-10-05 19:59:23 +02:00
parent 002e3cba33
commit 2b24fc2906
5 changed files with 73 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
# -----
# Translates requests sent through Invidious API at /api/invidious/
# to use internal extractors.
from flask import Response, request, redirect
from flask import Response, request, redirect, url_for
from markupsafe import escape
from time import strftime, gmtime, time
from ythdd_globals import safeTraverse
@@ -1045,4 +1045,6 @@ def lookup(data, req):
return notImplemented(data)
elif len(data) == 1:
if data[0] == "videoplayback":
return redirect(url_for('videoplaybackProxy', **req.args))
return stats() # /api/invidious/something