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>
43 lines
2 KiB
YAML
43 lines
2 KiB
YAML
services:
|
|
ingest:
|
|
build: ./ingest
|
|
image: radieo-ingest
|
|
volumes:
|
|
- ./cache:/cache # volume partagé avec le stream (rw : téléchargements)
|
|
- ./state:/state # état persistant (SQLite) hors du cache éphémère
|
|
- ./config:/config:ro # config éditable sans rebuild (urls.txt yt-dlp)
|
|
environment:
|
|
- RADIEO_CACHE_DIR=/cache
|
|
- RADIEO_STATE_DIR=/state
|
|
- RADIEO_HTTP_PORT=8080
|
|
# Source Navidrome / OpenSubsonic (voir .env / .env.example).
|
|
# Laisser vide désactive la source : le stream joue alors son cache local.
|
|
- RADIEO_NAVIDROME_URL=${RADIEO_NAVIDROME_URL:-}
|
|
- RADIEO_NAVIDROME_USER=${RADIEO_NAVIDROME_USER:-}
|
|
- RADIEO_NAVIDROME_PASSWORD=${RADIEO_NAVIDROME_PASSWORD:-}
|
|
- RADIEO_NAVIDROME_PLAYLIST=${RADIEO_NAVIDROME_PLAYLIST:-}
|
|
- RADIEO_RETENTION_KEEP=${RADIEO_RETENTION_KEEP:-20}
|
|
# Source yt-dlp : liste d'URL dans config/urls.txt (créer depuis l'exemple).
|
|
- RADIEO_YTDLP_URLS_FILE=/config/urls.txt
|
|
# Source ListenBrainz : URL du feed de recommandations (ou chemin local
|
|
# sous /config, ex. /config/recommendations.xml). Vide désactive la source.
|
|
- RADIEO_LISTENBRAINZ_URL=${RADIEO_LISTENBRAINZ_URL:-}
|
|
# Dosage du mix entre les sources (0 désactive).
|
|
- RADIEO_WEIGHT_NAVIDROME=${RADIEO_WEIGHT_NAVIDROME:-3}
|
|
- RADIEO_WEIGHT_YTDLP=${RADIEO_WEIGHT_YTDLP:-1}
|
|
- RADIEO_WEIGHT_LISTENBRAINZ=${RADIEO_WEIGHT_LISTENBRAINZ:-2}
|
|
# Canonicalizer MusicBrainz (identité MBID inter-sources ; sans clé).
|
|
- RADIEO_CANONICAL_ENABLED=${RADIEO_CANONICAL_ENABLED:-1}
|
|
- RADIEO_USER_AGENT=${RADIEO_USER_AGENT:-radieo/0.1 (personal music radio)}
|
|
restart: unless-stopped
|
|
|
|
stream:
|
|
build: ./stream
|
|
image: radieo-stream
|
|
depends_on:
|
|
- ingest
|
|
ports:
|
|
- "8000:8000" # flux HTTP : http://localhost:8000/radio.mp3
|
|
volumes:
|
|
- ./cache:/cache:ro # lecture seule : secours + résolution des chemins
|
|
restart: unless-stopped
|