navidrome_bridge: add dropbox mode writing straight to the request spool
Reading radio_conjurer.liq shows request.playlist is not a Liquidsoap playlist at all - it is a drop box. queue_processing() runs every 60s, reads every line, pushes each into request.queue() as a URI, then deletes the file and recreates it empty. That changes what writing to it means, so the mode is now named and documented for what it is. BRIDGE_MODE=dropbox (with "playlist" kept as an alias) appends the exact translated path to that file. Because the lines are pushed as URIs it is an exact hand-off - no keyword search - and it involves neither betoniarka nor the bot, just the file and Liquidsoap. The liq also puts requests_queue first in the fallback and does not apply the check_next replay guard to it, so a request interrupts the rotation and plays even if the track ran recently; both are now documented rather than left to be discovered. Fixes found while wiring this up: * the existence check was unconditional while the library mount was documented as optional, so a drop-box-only setup could never queue anything. It is now BRIDGE_VERIFY_FILE_EXISTS (auto|true|false), defaulting to checking only when the library is actually visible; * a missing parent dir was silently created, which would swallow requests into the container's own filesystem when the radio's data dir was not mounted. It is now a hard error naming the likely cause. Verified: alias resolves; append/drain/append cycle against a simulation of the liq's read-remove-recreate; both misconfigurations raise instead of silently succeeding; drop-box-only path works with the library absent; api mode unchanged, still prepending the sentinel that wyszukaj() discards. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -15,12 +15,14 @@ services:
|
||||
# Which starred tracks were already sent to the radio.
|
||||
- ./data:/data
|
||||
|
||||
# ONLY for BRIDGE_MODE=playlist: the radio's data dir, so the exact path
|
||||
# can be appended to request.playlist. Leave commented out for the
|
||||
# default "api" mode, which needs no shared filesystem at all.
|
||||
# ONLY for BRIDGE_MODE=dropbox: the radio's data dir, so the exact path
|
||||
# can be appended to request.playlist - the file radio_conjurer.liq
|
||||
# drains every 60s. Leave commented out for the default "api" mode,
|
||||
# which needs no shared filesystem at all.
|
||||
# - /srv/betoniarka/data:/srv/betoniarka/data
|
||||
|
||||
# Optional, and only useful in playlist mode: mounting the library here
|
||||
# Optional, and only useful in dropbox mode: mounting the library here
|
||||
# (read-only) lets the bridge verify a translated path really exists
|
||||
# before queueing it, turning a silent radio no-op into a clear error.
|
||||
# before queueing it (BRIDGE_VERIFY_FILE_EXISTS=auto), turning a silent
|
||||
# radio no-op into a clear error.
|
||||
# - /srv/betoniarka/music:/srv/betoniarka/music:ro
|
||||
|
||||
Reference in New Issue
Block a user