fix serialization bug
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Roy Olav Purser 2023-07-07 20:17:05 +02:00
parent f8dd88e8a5
commit 9b36a2ed1e
Signed by: roypur
GPG Key ID: 90142918D5E59AD3

View File

@ -115,9 +115,7 @@ class ProxyElem:
try: try:
async with self.local() as session: async with self.local() as session:
logger.info(request_data.json()) resp = await session.post(proxy_server, json=json.loads(request_data.json()))
logger.info(request_data)
resp = await session.post(proxy_server, json=request_data.dict())
response_data = cast( response_data = cast(
ProxyResponse, ProxyResponse.parse_raw(await resp.text()) ProxyResponse, ProxyResponse.parse_raw(await resp.text())
) )
@ -224,9 +222,6 @@ for proxy_provider in proxies.values():
streamlink_sessions[proxy_elem.proxy].set_option( streamlink_sessions[proxy_elem.proxy].set_option(
"http-proxy", "socks5://" + proxy_elem.proxy "http-proxy", "socks5://" + proxy_elem.proxy
) )
streamlink_sessions[proxy_elem.proxy].set_option(
"https-proxy", "socks5://" + proxy_elem.proxy
)
if icecast_server is not None and stream_server is not None: if icecast_server is not None and stream_server is not None:
try: try: