518155051f
- SQLite-Cache für API-Rate-Limits (LRU, 10k Einträge) - TMDB/MusicBrainz/TheTVDB Clients - Pre-Scan-Modul für TOC-Lesung ohne Ripping - Metadaten-Preview UI - Jellyfin-Formatierung (NFO + Images) - API Endpoints für Lookup, Confirm, Format
31 lines
599 B
Python
31 lines
599 B
Python
"""API-Konfiguration."""
|
|
|
|
from pydantic import BaseSettings
|
|
from typing import Optional
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Rippy API Settings."""
|
|
|
|
# API Keys
|
|
tmdb_api_key: Optional[str] = None
|
|
thetvdb_api_key: Optional[str] = None
|
|
musicbrainz_user: Optional[str] = None
|
|
|
|
# Cache
|
|
cache_ttl: int = 86400 # 24h default
|
|
|
|
# Ripping
|
|
rip_output_dir: str = "/app/media"
|
|
temp_dir: str = "/app/temp"
|
|
|
|
# Logging
|
|
log_level: str = "INFO"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|