# -----------------------------------------------------------------------------
# AIOMetadata Addon - Environment Variables
# for the full documentation of env variables visit:
# https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md
# -----------------------------------------------------------------------------

# -- Core Configuration --
# The port the addon server will run on.
PORT=1337

# The public hostname (e.g., https://your-domain.com or http://127.0.0.1:1337) where the addon is accessible.
# This is crucial for Stremio to correctly locate your addon's manifest and resources.
HOST_NAME=https://${AIOMETADATA_HOSTNAME}

# -- API Keys (Required for full functionality) --
# Your TMDB API key. Essential for movie and some series metadata.
TMDB_API=
# Your TVDB API key. Optional but highly recommended for series and some anime metadata.
TVDB_API_KEY=
# Your Fanart.tv API key. Optional, used for fetching high-quality logos and backgrounds.
FANART_API_KEY=
# Your Rating Poster DB (RPDB) API key. Optional, for displaying ratings on posters.
RPDB_API_KEY=
# Your MDBList API key. Optional, for integrating MDBList catalogs.
MDBLIST_API_KEY=

# -- Database & Caching --
# Connection URI for the database. SQLite is used for local storage, but PostgreSQL is also supported.
# For SQLite (default):
DATABASE_URI=sqlite://addon/data/db.sqlite
# For PostgreSQL:
# DATABASE_URI=postgresql://user:password@localhost:5432/aiometadata

# Connection string for your Redis instance, used for caching.
REDIS_URL=redis://aiometadata_redis:6379

# -- Security & Admin --
# An optional password to protect the addon's configuration page from unauthorized access.
# ADDON_PASSWORD=
# An optional key to protect administrative dashboard endpoints.
# ADMIN_KEY=

# -- Cache Performance & Warming --
# Set to "false" to disable automatic cache warming on startup. (Default: true)
ENABLE_CACHE_WARMING=true
CACHE_WARMUP_UUIDS=1f1da7d1-2757-4675-baae-df787ebcc68a
# Choose warm-up mode, 'essential' warms select TMDB/MAL catalogs with limited depth
# whilst 'comprehensive' warms all the catalogs present in a UUID, at the max depth specified below
# NOTE: comprehensive *requires* a CACHE_WARMUP_UUID to be set
CACHE_WARMUP_MODE=comprehensive
# Set the max page number to warm per catalog (Default: 100)
CATALOG_WARMUP_MAX_PAGES_PER_CATALOG=100
# Set to "false" to disable warming of popular TMDB content. (Default: true)
TMDB_POPULAR_WARMING_ENABLED=true
# How often (in hours) to warm popular TMDB content. (Default: 24)
CACHE_WARM_INTERVAL_HOURS=24
# Set to "false" to disable MAL-specific catalog warming. (Default: true)
MAL_WARMUP_ENABLED=true
# Interval in hours for MAL catalog warming. (Default: 6)
MAL_WARMUP_INTERVAL_HOURS=6

# Set the keys to be used for warm-up tasks, if these aren't set, it will fallback to TMDB_API & TVDB_API_KEY
# These variables aren't exposed in the configuration UI like the fallback variables mentioned above
# BUILT_IN_TVDB_API_KEY=
# BUILT_IN_TMDB_API_KEY=

# Specify a custom UUID to use for the cache warming config, this way you can pre-warm content to your liking
# A custom UUID is highly recommended for private instances as it will prewarm the exact content
# you'll be consuming (your catalogs, regional settings etc) resulting in a significant upgrade in responsivness
# If unset, a default system configuration is used.
# Example: CACHE_WARMUP_UUID=550e8400-e29b-41d4-a716-446655440000
# CACHE_WARMUP_UUID=your-custom-uuid


# -- UI & Customization --
# An optional suffix to add to the addon's name in the manifest (e.g., "| My Server").
# ADDON_NAME_SUFFIX=
# Optional custom HTML blurb to display on the configuration page.
# CUSTOM_DESCRIPTION_BLURB=
# The number of items to display per page in catalogs. (Default: 20)
CATALOG_LIST_ITEMS_SIZE=20

# -- Advanced/Proxy Configuration --
# The base URL for the Jikan (MyAnimeList) API. (Default: https://api.jikan.moe/v4)
# JIKAN_API_BASE=https://api.jikan.moe/v4
# Optional SOCKS proxy for TMDB requests (e.g., socks5://user:pass@host:port).
# TMDB_SOCKS_PROXY_URL=
# Optional SOCKS proxy for Jikan/MAL requests.
# MAL_SOCKS_PROXY_URL=
# Optional SOCKS proxy for MDBList requests.
# MDBLIST_SOCKS_PROXY_URL=

# -- Logging --
# Set the logging level. Options: 'silent', 'fatal', 'error', 'warn', 'info', 'success', 'debug', 'trace', 'verbose'.
# (Default: 'info' for production, 'debug' for development)
LOG_LEVEL=error
