Files
navidrome-music-sync/app/config.py
T
Antigravity e5afeb06cc feat: Phase 3 AI Radio (DJ Host & interleaved playlist) and Like/Dislike/Delete actions
- Add Like button: promotes wave track to permanent library and refills buffer
- Add Dislike button: blacklists track in SQLite disliked_tracks, removes audio, refills buffer
- Add Delete button in history table for library file removal
- Add AI Radio module: wttr.in weather, Qwen 2.5 host monologues, speech synthesis, ID3 tags
- Generate interleaved 'AI Радио.m3u8' alongside clean 'Моя Волна.m3u8'
- Update Web UI with Radio DJ card, voice selection, and track actions
2026-10-12 16:34:46 +03:00

48 lines
1.3 KiB
Python

import os
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
YANDEX_MUSIC_TOKEN: str = ""
MUSIC_DIR: str = "/music"
DATA_DIR: str = "/app/data"
NAVIDROME_URL: str = "https://music.qpid.pro"
NAVIDROME_USER: str = ""
NAVIDROME_PASSWORD: str = ""
DOWNLOAD_LYRICS: bool = True
AUDIO_FORMAT: str = "mp3"
AUDIO_BITRATE: str = "320k"
HOST: str = "0.0.0.0"
PORT: int = 8005
# Authentication & Security
AUTH_ENABLED: bool = True
SECRET_KEY: str = "navidrome-sync-secret-key-2026-qpid"
ADMIN_PASSWORD: str = ""
NAVIDROME_INTERNAL_URL: str = "http://127.0.0.1:4533"
# Ollama LLM Settings
OLLAMA_URL: str = "http://127.0.0.1:11434"
OLLAMA_MODEL: str = "qwen2.5:1.5b"
# Wave Rotation
WAVE_AUTO_ROTATE_HOURS: int = 6
WAVE_CANDIDATE_POOL: int = 40
# AI Radio DJ Settings
RADIO_ENABLED: bool = True
RADIO_VOICE: str = "ru-RU-DmitryNeural"
WEATHER_CITY: str = ""
RADIO_INTRO_INTERVAL: int = 2
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
extra = "ignore"
settings = Settings()
# Ensure directories exist
os.makedirs(settings.MUSIC_DIR, exist_ok=True)
os.makedirs(settings.DATA_DIR, exist_ok=True)
os.makedirs(os.path.join(settings.DATA_DIR, "tmp"), exist_ok=True)