-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: music action: commit revision: path_from: revision_from: 70b79edd49befbdbda59456b790f7970e88f8fe3: path_to: revision_to:
commit 70b79edd49befbdbda59456b790f7970e88f8fe3 Author: epoch <epoch@hacking.allowed.org> Date: Tue Dec 17 00:07:01 2019 -0600 re-enabled the icy-metadata in music-stream diff --git a/music-stream b/music-stream
--- a/music-stream +++ b/music-stream @@ -1,18 +1,18 @@ #!/bin/bash -#icy_metaint=1024 -#while read -t 2 LINE;do -# printf "%s\n" "$LINE" -#done \ -# | if grep -i "Icy-Metadata:" | cut -d: -f2- | grep 1 >/dev/null;then -# printf "HTTP/1.1 200 OK\r\n" -# printf "icy-metaint: %s\r\n" "${icy_metaint}" -# printf "Content-Type: audio/ogg\r\n\r\n" -# stdbuf -o0 pacat --record -d alsa_output.pci-0000_00_07.0.analog-stereo.monitor --format=s16le \ -# | stdbuf -o0 oggenc - -r -C 2 -R 44100 -q 2 \ -# | icy-metadata "${icy_metaint}" -#else +icy_metaint=65536 +while read -t 2 LINE;do + printf "%s\n" "$LINE" +done \ + | if stdbuf -oL grep -i "Icy-Metadata:" | stdbuf -oL cut -d: -f2- | stdbuf -oL grep 1 >/dev/null;then + printf "HTTP/1.1 200 OK\r\n" + printf "icy-metaint: %s\r\n" "${icy_metaint}" + printf "Content-Type: audio/ogg\r\n\r\n" + stdbuf -o0 pacat --record -d alsa_output.pci-0000_00_07.0.analog-stereo.monitor --format=s16le \ + | stdbuf -o0 oggenc - -r -C 2 -R 44100 -q 2 \ + | stdbuf -o0 icy-metadata "${icy_metaint}" +else printf "HTTP/1.1 200 OK\r\n" printf "Content-Type: audio/ogg\r\n\r\n" stdbuf -o0 pacat --record -d alsa_output.pci-0000_00_07.0.analog-stereo.monitor --format=s16le \ | stdbuf -o0 oggenc - -r -C 2 -R 44100 -q 2 -#fi +fi
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 16:14:56 2024