From adf960753cc68da6db9ebcd3ad247cfdfb8dc416 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Sun, 7 Sep 2025 15:17:19 -0500 Subject: [PATCH] Changed user-agent for head request to use m3u account --- apps/proxy/vod_proxy/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/proxy/vod_proxy/views.py b/apps/proxy/vod_proxy/views.py index 79d540fd..d4748cf3 100644 --- a/apps/proxy/vod_proxy/views.py +++ b/apps/proxy/vod_proxy/views.py @@ -290,8 +290,10 @@ class VODStreamView(View): # Make a small range GET request to get content length since providers don't support HEAD # We'll use a tiny range to minimize data transfer but get the headers we need + # Use M3U account's user agent as primary, client user agent as fallback + m3u_user_agent = m3u_account.get_user_agent().user_agent if m3u_account.get_user_agent() else None headers = { - 'User-Agent': client_user_agent or 'Dispatcharr/1.0', + 'User-Agent': m3u_user_agent or client_user_agent or 'Dispatcharr/1.0', 'Accept': '*/*', 'Range': 'bytes=0-1' # Request only first 2 bytes }