Skip to content

Instantly share code, notes, and snippets.

@Mnkai

Mnkai/obengit.sh

Last active Oct 6, 2019
Embed
What would you like to do?
Obengit (Depends on Tc and mpv)
#!/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