mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Changed user-agent for head request to use m3u account
This commit is contained in:
parent
c239f0300f
commit
adf960753c
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue