diff --git a/comet/api/stream.py b/comet/api/stream.py index 2281fd9..70e018e 100644 --- a/comet/api/stream.py +++ b/comet/api/stream.py @@ -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")