Added Support for DLHD channels without MFP

This commit is contained in:
UrloMythus
2025-02-16 21:25:20 +01:00 Unverified
parent 2a959da071
commit 9710a6f437
2 changed files with 14 additions and 11 deletions
+9 -3
View File
@@ -254,13 +254,19 @@ async def addon_stream(request: Request,config, type, id,):
if MFP == "1":
if id in webru_vary:
i = i+1
webru_url = await webru(id,"vary",client, MFP_CREDENTIALS)
webru_url = await webru(id,"vary",client)
streams['streams'].append({'title': f"{Icon}Server X-{i} " + channel['title'],'url': webru_url})
if id in webru_dlhd:
if DLHD == "1":
i = i+1
webru_url_2 = await webru(id,"dlhd",client,MFP_CREDENTIALS)
streams['streams'].append({'title': f"{Icon}Server D-{i} " + channel['title'],'url': webru_url_2})
webru_url_2,Referer_webru_url_2,Origin_webru_url_2 = await webru(id,"dlhd",client)
if MFP== "1":
webru_url_2 = f'{MFP_url}/proxy/hls/manifest.m3u8?api_password={MFP_password}&d={webru_url_2}&h_Referer={Referer_webru_url_2}&h_Origin={Origin_webru_url_2}&h_User-Agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F58.0.3029.110%20Safari%2F537.3'
streams['streams'].append({'title': f"{Icon}Server D-{i} " + channel['title'],'url': webru_url_2})
else:
streams['streams'].append({'title': f'{Icon}Server D-{i}' + channel['title'], 'url': webru_url_2, "behaviorHints": {"notWebReady": True, "proxyHeaders": {"request": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3", "Accept": "*/*", "Accept-Language": "en-US,en;q=0.5", "Origin": Origin_webru_url_2, "DNT": "1", "Sec-GPC": "1", "Connection": "keep-alive", "Referer": Referer_webru_url_2, "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "cross-site", "Pragma": "no-cache", "Cache-Control": "no-cache", "TE": "trailers"}}}})
if not streams['streams']:
raise HTTPException(status_code=404)