Skip to content

Commit

Permalink
fix: try to fix Nvidia shield debrid stream proxying
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy authored Jul 23, 2024
1 parent 6779399 commit bdb22dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bdb22dc

Please sign in to comment.