From 0382e74b1264773c5598279254a92cc78b2e1576 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 5 Jul 2021 14:47:08 +0200 Subject: l radio: fix listener counting --- lass/2configs/radio.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs/radio.nix') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index a474b0eb..2c539917 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -225,7 +225,7 @@ in { ${pkgs.mpc_cli}/bin/mpc idle player > /dev/null ${pkgs.mpc_cli}/bin/mpc current -f %file% done | while read track; do - listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^mptcp' | wc -l) + listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^tcp' | wc -l) echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE" echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE" ${set_irc_topic} "playing: $track listeners: $listeners" -- cgit v1.2.3 From cd816fb427e977927aa34c8e7897d64248d3a660 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 5 Jul 2021 14:47:29 +0200 Subject: l radio: allow world to skip/like tracks --- lass/2configs/radio.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lass/2configs/radio.nix') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 2c539917..b1e1ed4d 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -347,6 +347,19 @@ in { locations."= /recent".extraConfig = '' alias /tmp/played; ''; + locations."= /current".extraConfig = '' + proxy_pass http://localhost:8001; + ''; + locations."= /skip".extraConfig = '' + proxy_pass http://localhost:8001; + ''; + locations."= /good".extraConfig = '' + proxy_pass http://localhost:8001; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; }; virtualHosts."lassul.us".locations."= /the_playlist".extraConfig = let html = pkgs.writeText "index.html" '' -- cgit v1.2.3