Skip to content

Commit

Permalink
fix: ip debrid
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy authored Oct 4, 2024
1 parent 6ee6b92 commit 057126b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,10 @@ async def playback(request: Request, b64config: str, hash: str, index: str):
f"DELETE FROM download_links WHERE debrid_key = '{config['debridApiKey']}' AND hash = '{hash}' AND file_index = '{index}'"
)

ip = ""
if (
not settings.PROXY_DEBRID_STREAM
or settings.PROXY_DEBRID_STREAM_PASSWORD != config["debridStreamProxyPassword"]
):
ip = get_client_ip(request)
ip = get_client_ip(request)

if not download_link:
debrid = getDebrid(session, config, ip)
debrid = getDebrid(session, config, ip if (not settings.PROXY_DEBRID_STREAM or settings.PROXY_DEBRID_STREAM_PASSWORD != config["debridStreamProxyPassword"]) else "")
download_link = await debrid.generate_download_link(hash, index)
if not download_link:
return FileResponse("comet/assets/uncached.mp4")
Expand Down

0 comments on commit 057126b

Please sign in to comment.