From 14a7590c82fd95a4f41133b0ea62a0a72807b575 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sun, 24 May 2026 15:13:26 +0200 Subject: [PATCH] fix(fmrelay): start path + JSON API + mounts XML + inline live preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four bugs surfaced when actually running a relay live (#377): 1. cmd_start sanity check still referenced lame_present after the ffmpeg switch — every start failed with `fmrelayctl: line 209: lame_present: command not found`. Renamed to ffmpeg_present. 2. log()/warn() wrote the human banner to stdout, which the API's subprocess.check_output(..., stderr=subprocess.STDOUT) merged into the JSON parser. /start returned 500 even when the runner spawned correctly. log() now writes to stderr; api/_ctl_json switches to subprocess.run(capture_output=True) so stdout stays clean JSON and stderr is only surfaced on failure. 3. emit_mounts_json grep'd `...` elements but icecast2 /admin/listmounts uses `` attribute form. The mounts table always showed empty. New parser handles the real XML shape + reports connected_sec + content_type alongside listeners. 4. admin webui had only the "Open Webradio →" link (which targets a vhost that doesn't exist yet). Added a card with `