From 47793375303c6a43490c14d1835622da8c044a21 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 4 Feb 2023 16:20:19 +0100 Subject: [PATCH] Show the progress of the iptv script on stdout --- scripts/.local/share/scripts/iptv | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/.local/share/scripts/iptv b/scripts/.local/share/scripts/iptv index 02acdef..257d784 100755 --- a/scripts/.local/share/scripts/iptv +++ b/scripts/.local/share/scripts/iptv @@ -16,21 +16,25 @@ select_channel() { streaming_server() { if [ "$1" = "start" ]; then - docker run --publish "$PORT:$PORT" --rm --tmpfs "/dev/disk/by-id:noexec,rw,size=4k" \ + echo "Spinning up the server" + docker run --publish "$PORT:$PORT" --name acestream-server --rm --tmpfs "/dev/disk/by-id:noexec,rw,size=4k" \ --tmpfs "/root/ACEStream:noexec,rw,size=4096m" \ - $DOCKER_IMAGE >/dev/null 2>&1 + "$DOCKER_IMAGE" >/dev/null 2>&1 echo "Server started" else - docker stop $DOCKER_IMAGE >/dev/null 2>&1 + echo "Stopping the server" + docker stop acestream-server >/dev/null 2>&1 echo "Server stopped" fi } stream_channel() { - nix-shell -p vlc --run "$HOME/.local/share/scripts/playstream.py --ace-stream-pid $1 --player '$(whereis vlc | cut -d ':' -f 2)'" + echo "Starting the stream" + nix-shell -p vlc --run "$HOME/.local/share/scripts/playstream.py --ace-stream-pid $1 --player '$(whereis vlc | cut -d ":" -f 2)'" } channel_selection() { + echo "Selection time" case "$1" in "Gol ") stream_channel "dfffbcdd9c7e32d5dc88d268dee830ff2a0d3ab6" ;; "Gol 2") stream_channel "2aab272d05089ce881538a1b3288d391de152d53" ;;