#=================================================#
#   ██████╗ ██████╗ ███╗   ███╗███████╗████████╗  #
#  ██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝  #
#  ██║     ██║   ██║██╔████╔██║█████╗     ██║     #
#  ██║     ██║   ██║██║╚██╔╝██║██╔══╝     ██║     #
#  ╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗   ██║     #
#   ╚═════╝ ╚═════╝ ╚═╝     ╚═╝╚══════╝   ╚═╝     #
#=================================================#

# ============================== #
# Stremio Addon Configuration    #
# ============================== #
ADDON_ID=stremio.comet.fast
ADDON_NAME=Comet

# ============================== #
# FastAPI Server Configuration   #
# ============================== #
FASTAPI_HOST=0.0.0.0
FASTAPI_PORT=8000
FASTAPI_WORKERS=1 # set to -1 for auto-scaling (min((os.cpu_count() or 1) * 2 + 1, 12))
USE_GUNICORN=True # Will use uvicorn if False or if on Windows

# ============================== #
# Dashboard Settings             #
# ============================== #
ADMIN_DASHBOARD_PASSWORD=CHANGE_ME # The password to access the dashboard

# ============================== #
# Database Configuration         #
# ============================== #
DATABASE_TYPE=sqlite # Options: sqlite, postgresql
DATABASE_URL=comet:comet@comet-db:port # For PostgreSQL
DATABASE_PATH=data/comet.db # Only relevant for SQLite

# ============================== #
# Cache Settings (Seconds)       #
# ============================== #
METADATA_CACHE_TTL=2592000  # 30 days
TORRENT_CACHE_TTL=1296000  # 15 days
DEBRID_CACHE_TTL=86400  # 1 day
SCRAPE_LOCK_TTL=300  # 5 minutes - Duration for distributed scraping locks
SCRAPE_WAIT_TIMEOUT=30  # 30 seconds - Max time to wait for other instance to complete scraping

# ============================== #
# Debrid Proxy Configuration     #
# ============================== #
DEBRID_PROXY_URL=http://warp:1080 # Bypass Debrid Services and Torrentio IP blacklist

# ============================== #
# Indexer Manager Settings       #
# ============================== #
INDEXER_MANAGER_TYPE=none # Options: jackett, prowlarr, none
INDEXER_MANAGER_URL=http://127.0.0.1:9117
INDEXER_MANAGER_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
INDEXER_MANAGER_TIMEOUT=60  # Max time to get search results (seconds)
INDEXER_MANAGER_INDEXERS='["EXAMPLE1_CHANGETHIS", "EXAMPLE2_CHANGETHIS"]' # Jackett/Prowlarr indexers

# ============================== #
# Torrent Settings               #
# ============================== #
GET_TORRENT_TIMEOUT=5 # Max time to obtain torrent info hash (seconds)
DOWNLOAD_TORRENT_FILES=True # Enable torrent file retrieval (instead of magnet link only)

# ============================== #
# Scraping Configuration         #
# ============================== #
SCRAPE_COMET=true
COMET_URL=https://comet.elfhosted.com

SCRAPE_ZILEAN=true
ZILEAN_URL=https://zilean.elfhosted.com

SCRAPE_TORRENTIO=true
TORRENTIO_URL=https://torrentio.strem.fun

SCRAPE_MEDIAFUSION=true
MEDIAFUSION_URL=https://mediafusion.elfhosted.com
MEDIAFUSION_API_PASSWORD= # API password for MediaFusion instances that require authentication
MEDIAFUSION_LIVE_SEARCH=true

# ============================== #
# Debrid Stream Proxy Settings   #
# ============================== #
PROXY_DEBRID_STREAM=True
PROXY_DEBRID_STREAM_PASSWORD=CHANGE_ME
PROXY_DEBRID_STREAM_MAX_CONNECTIONS=-1 # -1 to disable connection limits
PROXY_DEBRID_STREAM_DEBRID_DEFAULT_SERVICE=realdebrid
PROXY_DEBRID_STREAM_DEBRID_DEFAULT_APIKEY=CHANGE_ME

# ============================== #
# Content Filtering              #
# ============================== #
REMOVE_ADULT_CONTENT=False

# ============================== #
# UI Customization               #
# ============================== #
CUSTOM_HEADER_HTML=None

# ============================== #
# StremThru Integration          #
# ============================== #
STREMTHRU_URL=https://stremthru.13377001.xyz # needed to use debrid services
