mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2026-01-30 06:10:57 +03:00
trying to just fix aiohttp.ClientSession call
This commit is contained in:
@@ -46,7 +46,7 @@ def get_yn_input(prompt):
|
|||||||
|
|
||||||
|
|
||||||
async def create_web_session():
|
async def create_web_session():
|
||||||
return aiohttp.ClientSession()
|
return aiohttp.ClientSession(trust_env=True)
|
||||||
|
|
||||||
|
|
||||||
async def pair_device(web_session: aiohttp.ClientSession):
|
async def pair_device(web_session: aiohttp.ClientSession):
|
||||||
|
|||||||
@@ -172,9 +172,9 @@ async def main_async(config, debug, http_tracing):
|
|||||||
trace_config.on_response_chunk_received.append(tracer.on_response_chunk_received)
|
trace_config.on_response_chunk_received.append(tracer.on_response_chunk_received)
|
||||||
trace_config.on_request_end.append(tracer.on_request_end)
|
trace_config.on_request_end.append(tracer.on_request_end)
|
||||||
trace_config.on_request_exception.append(tracer.on_request_exception)
|
trace_config.on_request_exception.append(tracer.on_request_exception)
|
||||||
web_session = aiohttp.ClientSession(connector=tcp_connector, trace_configs=[trace_config])
|
web_session = aiohttp.ClientSession(trust_env=True, connector=tcp_connector, trace_configs=[trace_config])
|
||||||
else:
|
else:
|
||||||
web_session = aiohttp.ClientSession(connector=tcp_connector)
|
web_session = aiohttp.ClientSession(trust_env=True, connector=tcp_connector)
|
||||||
|
|
||||||
api_helper = api_helpers.ApiHelper(config, web_session)
|
api_helper = api_helpers.ApiHelper(config, web_session)
|
||||||
for i in config.devices:
|
for i in config.devices:
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ class AddDevice(ModalWithClickExit):
|
|||||||
def __init__(self, config, **kwargs) -> None:
|
def __init__(self, config, **kwargs) -> None:
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.config = config
|
self.config = config
|
||||||
self.web_session = aiohttp.ClientSession()
|
self.web_session = aiohttp.ClientSession(trust_env=True)
|
||||||
self.api_helper = api_helpers.ApiHelper(config, self.web_session)
|
self.api_helper = api_helpers.ApiHelper(config, self.web_session)
|
||||||
self.devices_discovered_dial = []
|
self.devices_discovered_dial = []
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ class AddChannel(ModalWithClickExit):
|
|||||||
def __init__(self, config, **kwargs) -> None:
|
def __init__(self, config, **kwargs) -> None:
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.config = config
|
self.config = config
|
||||||
web_session = aiohttp.ClientSession()
|
web_session = aiohttp.ClientSession(trust_env=True)
|
||||||
self.api_helper = api_helpers.ApiHelper(config, web_session)
|
self.api_helper = api_helpers.ApiHelper(config, web_session)
|
||||||
|
|
||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
|
|||||||
Reference in New Issue
Block a user