diff --git a/apps/aiometadata/.env b/apps/aiometadata/.env index 85ab6ffd..85d222d1 100644 --- a/apps/aiometadata/.env +++ b/apps/aiometadata/.env @@ -1,17 +1,48 @@ # ----------------------------------------------------------------------------- # AIOMetadata Addon - Environment Variables -# for the full documentation of env variables visit: +# 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 +PORT=3232 -# The public hostname (e.g., https://your-domain.com or http://127.0.0.1:1337) where the addon is accessible. +# The public hostname (e.g., https://your-domain.com or http://127.0.0.1:3232) where the addon is accessible. # This is crucial for Stremio to correctly locate your addon's manifest and resources. HOST_NAME=https://${AIOMETADATA_HOSTNAME} +# The Node environment. Usually 'development' or 'production'. +NODE_ENV=development + +# Set the logging level. Options: 'silent', 'fatal', 'error', 'warn', 'info', 'success', 'debug', 'trace', 'verbose'. +# (Default: 'info' for production, 'debug' for development) +LOG_LEVEL=info + + +# -- 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 key to protect administrative dashboard endpoints. +# ADMIN_KEY=your-secure-random-key-here +# Password for protected endpoints (if enabled in your deployment) +# ADDON_PASSWORD=your-addon-password + + +# -- Metrics Configuration -- +# Set to "true" to disable all telemetry/metrics collection for the dashboard. +# DISABLE_METRICS=false + + # -- API Keys (Required for full functionality) -- # Your TMDB API key. Essential for movie and some series metadata. TMDB_API= @@ -26,6 +57,19 @@ MDBLIST_API_KEY= # Your Gemini API key. Optional, for AI features. GEMINI_API_KEY= +# -- Integrations -- + +# Your SimKL client ID +SIMKL_CLIENT_ID= +# Your SimKL client secret +SIMKL_CLIENT_SECRET= +# The redirect URI for SimKL OAuth (must match your SimKL app settings) +# Example: https://your-domain.com/api/auth/simkl/callback +SIMKL_REDIRECT_URI= +# Time-to-live (in seconds) for caching SimKL activity checks. Reduces API spam when paginating. +# Default: 21600 (6 hours) +SIMKL_ACTIVITIES_TTL=21600 + # AniList API credentials (required for AniList integration) # Get these from https://anilist.co/settings/developer # Your AniList client ID @@ -46,52 +90,105 @@ TRAKT_CLIENT_SECRET= # Example: https://your-domain.com/api/auth/trakt/callback TRAKT_REDIRECT_URI= -# -- 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 +## Disable trakt as a search option (recommended on public instances) +DISABLE_TRAKT_SEARCH=false -# Connection string for your Redis instance, used for caching. -REDIS_URL=redis://aiometadata_redis:6379 +## Max number of trakt parallel requests (recommend 10-15 for selfhosters) +TRAKT_CONCURRENCY=5 + +## Spacing between requests (recommend 100ms for selfhosters) +TRAKT_MIN_TIME=200 + +# -- Cache TTL Configuration -- +# Catalog cache time-to-live in seconds (default: 86400 = 24 hours) +CATALOG_TTL=86400 +# Meta cache time-to-live in seconds (default: 604800 = 7 days) +META_TTL=604800 + +# -- Timezone Configuration -- +# Set the timezone for the server (e.g., America/New_York) +# TZ=America/New_York -# -- 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= +# Specify a custom UUID to use for the cache warming config. Highly recommended for private instances. +CACHE_WARMUP_UUIDS= +CACHE_WARMUP_UUID=system-cache-warmer # 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=essential +# How often (in hours) to warm popular TMDB content. (Default: 24, Minimum: 12) +CATALOG_WARMUP_INTERVAL_HOURS=24 +# Initial delay before starting catalog warming (in seconds) +CATALOG_WARMUP_INITIAL_DELAY_SECONDS=300 # Set the max page number to warm per catalog (Default: 100) CATALOG_WARMUP_MAX_PAGES_PER_CATALOG=100 +# Resume warming on restart (Default: true) +CATALOG_WARMUP_RESUME_ON_RESTART=true +# Enable quiet hours for catalog warming (Default: false) +CATALOG_WARMUP_QUIET_HOURS_ENABLED=false +# Quiet hours time range (e.g., 02:00-06:00) +CATALOG_WARMUP_QUIET_HOURS=02:00-06:00 +# Delay between catalog warmup tasks (in ms) +CATALOG_WARMUP_TASK_DELAY_MS=100 +# Logging level for catalog warming +CATALOG_WARMUP_LOG_LEVEL=info +# Auto warmup on version change +CATALOG_WARMUP_AUTO_ON_VERSION_CHANGE=false # 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) +# How often (in hours) to warm cache (Default: 24) CACHE_WARM_INTERVAL_HOURS=24 +# Language to use for cache warming (Default: en-US) +CACHE_WARM_LANGUAGE=en-US +# Enable cache warmup on startup (Default: true) +CACHE_WARMUP_ON_STARTUP=true + + +# -- MAL Catalog Background Warming -- # 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 +# Initial delay before starting MAL warming (in seconds) +MAL_WARMUP_INITIAL_DELAY_SECONDS=30 +# Delay between MAL warmup tasks (in ms) +MAL_WARMUP_TASK_DELAY_MS=100 +# Enable quiet hours for MAL warming (Default: false) +MAL_WARMUP_QUIET_HOURS_ENABLED=false +# Quiet hours range for MAL warming (e.g., 2-8) +MAL_WARMUP_QUIET_HOURS_RANGE=2-8 +# Number of priority pages for MAL warming +MAL_WARMUP_PRIORITY_PAGES=2 +# Enable/disable metadata warming for MAL +MAL_WARMUP_METADATA=false +# Enable priority warming for MAL +MAL_WARMUP_PRIORITY=true +# Enable scheduled MAL warming +MAL_WARMUP_SCHEDULE=true +# Enable decade-based MAL warming +MAL_WARMUP_DECADES=false +# Enable SFW mode for MAL warming +MAL_WARMUP_SFW=true +# Logging level for MAL warming +MAL_WARMUP_LOG_LEVEL=normal -# 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 +# -- Cache Cleanup Scheduler -- +# Enable automatic cache cleanup (Default: true) +CACHE_CLEANUP_AUTO_ENABLED=true +# Enable quiet hours for cache cleanup (Default: false) +CACHE_CLEANUP_QUIET_HOURS_ENABLED=false +# Quiet hours for cache cleanup (e.g., 02:00-06:00) +CACHE_CLEANUP_QUIET_HOURS=02:00-06:00 + + +# -- Catalog Configuration -- +# The number of items to display per page in catalogs. (Default: 20) +CATALOG_LIST_ITEMS_SIZE=20 # -- UI & Customization -- @@ -99,20 +196,20 @@ MAL_WARMUP_INTERVAL_HOURS=6 # 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 all requests (e.g., socks5://user:pass@host:port). +# SOCKS_PROXY_URL= +# Optional HTTP proxy for all requests. +# HTTP_PROXY= +# Optional HTTPS proxy for all requests. +# HTTPS_PROXY= # 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 +# Optional: Override the logo URL in the manifest +# ADDON_LOGO_URL=https://yourdomain.com/yourlogo.png