Created
October 28, 2016 13:33
-
-
Save tgautier/ad8b9e8f29a38efd842965caa02efe80 to your computer and use it in GitHub Desktop.
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 | |
VLC_BIN="/Applications/VLC.app/Contents/MacOS/VLC" | |
CHANNEL="/di_vocaltrance_aacplus" | |
if [ "$1" ]; then | |
CHANNEL="$1" | |
fi | |
if [ "$2" ]; then | |
VLC_BIN=`which $2` | |
shift | |
shift | |
options=$@ | |
if [ -z "$options" ]; then | |
options="-" | |
fi | |
VLC_BIN="$VLC_BIN $options" | |
else | |
VLC_BIN="$VLC_BIN -" | |
fi | |
curl "http://pub5.di.fm$CHANNEL" \ | |
-H 'Accept: */*' \ | |
-H 'Connection: keep-alive' \ | |
-H 'Referer: http://www.di.fm/' \ | |
-H 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' \ | |
-H 'Accept-Language: en-US,en;q=0.8' \ | |
--compressed | $VLC_BIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment