Skip to content

Instantly share code, notes, and snippets.

@tgautier
Created October 28, 2016 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgautier/ad8b9e8f29a38efd842965caa02efe80 to your computer and use it in GitHub Desktop.
Save tgautier/ad8b9e8f29a38efd842965caa02efe80 to your computer and use it in GitHub Desktop.
#!/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