Last active
October 6, 2019 11:12
-
-
Save Mnkai/c9dee424d7625f94ba003b89682dd7a3 to your computer and use it in GitHub Desktop.
Obengit (Depends on Tc and mpv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STREAMER_STREAM_URL="STREAM_URL_HERE" | |
open /Applications/Tc.app | |
mpv "$STREAMER_STREAM_URL" 2> /dev/stdout | grep -Fxq "offline" | |
while [ $? -ne 0 ]; do | |
echo "Streamer is offline! Retrying after 10 seconds..." | |
sleep 10 | |
mpv "$STREAMER_STREAM_URL" 2> /dev/stdout | grep -Fxq "offline" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment