preferred quality setting

This commit is contained in:
Simon
2026-06-17 15:44:20 +00:00
parent d73e413352
commit f8072884b2
7 changed files with 73 additions and 9 deletions

View File

@@ -551,6 +551,11 @@ def stream_video():
elif isinstance(info.get('http_headers'), dict):
upstream_headers = info['http_headers']
if request.method == 'HEAD' and selected_format:
manifest_url = selected_format.get('manifest_url')
if manifest_url:
return Response("", status=301, headers=[('Location', f"/api/stream?url={manifest_url}")])
referer_hint = None
if upstream_headers:
referer_hint = extract_referer(upstream_headers)