from pydantic_settings import BaseSettings, SettingsConfigDict from functools import lru_cache class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env", extra="ignore") # Server server_port: int = 3000 jwt_secret: str = "change_me_in_production" jwt_algorithm: str = "HS256" jwt_expire_days: int = 365 # ABS verwendet sehr lange Token-Laufzeiten # Admin admin_username: str = "admin" admin_password: str = "changeme" admin_email: str = "admin@example.com" # Paths audiofiles_path: str = "/audiofiles" database_url: str = "sqlite+aiosqlite:////app/data/db/audiolib.db" hls_cache_dir: str = "/app/data/hls_cache" covers_dir: str = "/app/data/covers" log_dir: str = "/app/data/logs" # Matching auto_match_books: bool = True auto_match_podcasts: bool = True podcast_update_interval_hours: int = 24 @lru_cache def get_settings() -> Settings: return Settings()