From bdb22dcc63b4ca6fd014faaf287b7d8034093c12 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:10:08 +0200 Subject: [PATCH] fix: try to fix Nvidia shield debrid stream proxying --- comet/api/stream.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/comet/api/stream.py b/comet/api/stream.py index d57b7ba..21b4020 100644 --- a/comet/api/stream.py +++ b/comet/api/stream.py @@ -417,10 +417,9 @@ async def close(self): end = int(end) if end else "" range = f"bytes={start}-{end}" - async with session.get( - download_link, headers={"Range": range} if range else None, proxy=proxy - ) as response: - if response.status == 206: + async with httpx.AsyncClient(proxy=proxy) as client: + response = await client.get(download_link, headers={"Range": range} if range else None) + if response.status_code == 206: streamer = Streamer() return StreamingResponse(