from pydantic_settings import BaseSettings
from pydantic import Field
from pathlib import Path

# בסיס הקבצים יהיה תקיית backend
BASE_DIR = Path(__file__).resolve().parent

class Settings(BaseSettings):
    MUSIC_DIR: str = Field(default=str(BASE_DIR / "music"), description="Path where songs are saved")
    NAVIDROME_SCAN_URL: str = Field(default="", description="URL to trigger Navidrome rescan")
    host: str = Field(default="0.0.0.0", description="Host to bind the server")
    port: int = Field(default=8000, description="Port to run the server on")
    reload: bool = Field(default=True, description="Enable reload for development")

    class Config:
        env_file = ".env"
        env_file_encoding = "utf-8"

settings = Settings()
