Skip to content

Instantly share code, notes, and snippets.

@dustincys
Last active April 26, 2016 01:47
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 dustincys/7c9a20a8ac555b9d04f6 to your computer and use it in GitHub Desktop.
Save dustincys/7c9a20a8ac555b9d04f6 to your computer and use it in GitHub Desktop.
radio
#!/bin/bash
# radio station CRI\CNN for HIT
usage(){
echo "usage: ./radio.sh [ [ [ -s | --station ] [ -c | --cache ] ] | [ -h | --help ] ]"
}
station="http://am846-lh.akamaihd.net/i/am846_1@301569/master.m3u8"
cache=500
while [ "$1" != "" ]; do
case $1 in
-s | --station ) shift
case $1 in
CRI | cri ) station="http://am846-lh.akamaihd.net/i/am846_1@301569/master.m3u8" ;;
EZFM | ezfm ) station="mms://enmms.chinabroadcast.cn/fm91.5";;
*) exit 1
esac
;;
-c | --cache) shift
cache=$1;;
-h | --help) usage
exit ;;
* ) usage
exit 1
esac
shift
done
while mplayer $station -cache $cache ; do
continue
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment