Add a second playback source and a weighted scheduler mixing it with Navidrome: - Scheduler picks a provider by SOURCE_WEIGHTS, falling through to the others when one has nothing ready, so no source can stall playback. - YtdlpProvider reads a hand-maintained config/urls.txt; container URLs (playlist/album/label/artist) are flat-extracted and one entry is drawn at random, honouring the anti-repeat window. Adds Track.source_url. - YtdlpFetcher downloads bestaudio via the yt-dlp library, reusing the atomic hidden-temp-then-rename pattern; Liquidsoap decodes the result. - Queue now dispatches to a fetcher registry keyed by backend. - Sweep orphaned download temp files on daemon startup (leftovers from a killed container otherwise pile up and trip the stream fallback). Verified end-to-end: yt-dlp opus decoded and served as 192 kbps MP3, and the 3:1 default mix observed in play history. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
1,019 B
Text
24 lines
1,019 B
Text
# radieo — configuration locale. Copier en `.env` et remplir.
|
|
# docker compose lit automatiquement `.env` pour ces variables.
|
|
|
|
# --- Source Navidrome / OpenSubsonic ---
|
|
# URL de base de ton serveur (sans /rest). Laisser les champs vides désactive
|
|
# la source : le stream joue alors uniquement les fichiers déjà dans cache/.
|
|
RADIEO_NAVIDROME_URL=https://navidrome.example.org
|
|
RADIEO_NAVIDROME_USER=monuser
|
|
RADIEO_NAVIDROME_PASSWORD=monmotdepasse
|
|
# Nom OU identifiant de la playlist à diffuser.
|
|
RADIEO_NAVIDROME_PLAYLIST=Radio
|
|
|
|
# --- Source yt-dlp ---
|
|
# La liste d'URL se met dans config/urls.txt (copier config/urls.txt.example).
|
|
# Rien à mettre ici ; le fichier absent désactive simplement la source.
|
|
|
|
# --- Dosage du mix entre sources (optionnel) ---
|
|
# Poids relatifs de tirage de chaque source (0 désactive la source).
|
|
RADIEO_WEIGHT_NAVIDROME=3
|
|
RADIEO_WEIGHT_YTDLP=1
|
|
|
|
# --- Rétention du cache (optionnel) ---
|
|
# Nombre de morceaux joués conservés sur disque avant éviction (LRU).
|
|
RADIEO_RETENTION_KEEP=20
|