From cf9431c1379cc4d503b1026d1bc19352a961e43e Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Sun, 29 Sep 2024 14:04:23 +0200 Subject: [PATCH] Added Support in config for daddylive --- Src/API/cb01.py | 4 +++- Src/Utilities/config.py | 3 +++ config.json | 10 +++++++++- run.py | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Src/API/cb01.py b/Src/API/cb01.py index f7f432e..561dc16 100644 --- a/Src/API/cb01.py +++ b/Src/API/cb01.py @@ -3,7 +3,9 @@ from bs4 import BeautifulSoup,SoupStrainer from Src.Utilities.info import is_movie,get_info_tmdb,get_info_imdb from Src.Utilities.convert import get_TMDb_id_from_IMDb_id from fake_headers import Headers - +import Src.Utilities.config as config +ForwardProxy_list = config.ForwardProxy +ForwardProxy = ForwardProxy_list[0] fake_headers = Headers() async def get_stayonline(link,client): diff --git a/Src/Utilities/config.py b/Src/Utilities/config.py index f415a4d..dd35fc3 100644 --- a/Src/Utilities/config.py +++ b/Src/Utilities/config.py @@ -14,7 +14,9 @@ TF_DOMAIN = SITE["Tantifilm"]['domain'] LC_DOMAIN = SITE["LordChannel"]['domain'] SW_DOMAIN = SITE["StreamingWatch"]['domain'] AW_DOMAIN = SITE['AnimeWorld']['domain'] +SKY_DOMAIN = SITE['SkyStreaming']['domain'] MYSTERIUS = SITE['Mysterius']['enabled'] +DLHD = SITE['DaddyLiveHD']['enabled'] #General GENERAL = config['General'] dotenv = GENERAL["load_env"] @@ -23,3 +25,4 @@ PORT = GENERAL["PORT"] HF = GENERAL["HF"] Public_Instance = GENERAL["Public_Instance"] MediaProxy = GENERAL["MediaProxy"] +ForwardProxy = GENERAL["ForwardProxy"] \ No newline at end of file diff --git a/config.json b/config.json index 5494aac..b487d99 100644 --- a/config.json +++ b/config.json @@ -20,6 +20,12 @@ }, "AnimeWorld":{ "domain":"so" + }, + "SkyStreaming":{ + "domain":"guru" + }, + "DaddyLiveHD":{ + "enabled":"1" } }, "General":{ @@ -28,6 +34,8 @@ "PORT": "8080", "HF": "1", "Public_Instance": "0", - "MediaProxy": ["test"] + "MediaProxy": ["Test"], + "ForwardProxy": ["Test"], + "Proxy": [] } } diff --git a/run.py b/run.py index 70291f0..789a54e 100644 --- a/run.py +++ b/run.py @@ -19,6 +19,7 @@ from slowapi.middleware import SlowAPIMiddleware from static.static import HTML # Configure logging MYSTERIUS = config.MYSTERIUS +DLHD = config.DLHD HOST = config.HOST PORT = int(config.PORT) HF = config.HF @@ -205,6 +206,11 @@ async def addon_stream(request: Request,config, type, id,): i = i+1 webru_url = await webru(id,"vary",client) streams['streams'].append({'title': f"{HF}Server {i} " + channel['title'],'url': webru_url}) + if id in webru_dlhd: + if DLHD == "1": + i = i+1 + webru_url = await webru(id,"dlhd",client) + streams['streams'].append({'title': f"{HF}Server {i} " + channel['title'],'url': webru_url}) if not streams['streams']: raise HTTPException(status_code=404) return respond_with(streams)