Add a third playback source: a ListenBrainz recommendations Atom feed. Each suggestion already carries a MusicBrainz recording MBID, title and artist, so it is keyed directly by MBID (source-agnostic identity, no extra lookup) and resolved to a concrete file — Navidrome search3 first, then a yt-dlp ytsearch1: fallback. - providers/listenbrainz.py: parse the Atom/HTML feed, anti-repeat on the MBID key, resolve Navidrome-then-yt-dlp. Feed may be an http(s) URL or a local path (for testing). - subsonic.py: add search_songs (search3) for resolution. - canonicalizer.py: short-circuit when a Track already has an MBID, so feed-provided MBIDs are trusted and MusicBrainz is not hit. - __main__.py: wire the provider in; register the yt-dlp fetcher as a resolution backend even when the yt-dlp source is off; close providers on shutdown. - config/compose/.env.example: RADIEO_LISTENBRAINZ_URL + weight. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
1.8 KiB
Text
39 lines
1.8 KiB
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.
|
|
|
|
# --- Source ListenBrainz ---
|
|
# Feed Atom de recommandations. URL http(s) du feed de syndication, ou chemin
|
|
# local sous /config (ex. /config/recommendations.xml) pour tester. Vide = off.
|
|
# ListenBrainz ne fait que *nommer* des morceaux : chacun est résolu vers
|
|
# Navidrome puis, à défaut, yt-dlp.
|
|
RADIEO_LISTENBRAINZ_URL=https://listenbrainz.org/syndication-feed/user/monuser/recommendations/weekly-exploration
|
|
|
|
# --- 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
|
|
RADIEO_WEIGHT_LISTENBRAINZ=2
|
|
|
|
# --- Canonicalizer MBID (optionnel) ---
|
|
# Résout (artiste, titre) -> MBID MusicBrainz pour dédupliquer entre sources.
|
|
# Aucune clé requise. Mettre 0 pour désactiver (clé = (artiste, titre)).
|
|
RADIEO_CANONICAL_ENABLED=1
|
|
# User-Agent envoyé à MusicBrainz (qui en exige un, descriptif).
|
|
RADIEO_USER_AGENT=radieo/0.1 (personal music radio)
|
|
|
|
# --- Rétention du cache (optionnel) ---
|
|
# Nombre de morceaux joués conservés sur disque avant éviction (LRU).
|
|
RADIEO_RETENTION_KEEP=20
|