Last active
March 3, 2021 18:13
-
-
Save fjebaker/f89ec5356f0ce3893846d473d8417f9d to your computer and use it in GitHub Desktop.
mpd BBC Radio Streams
This file contains 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 | |
# station urls found in http://www.suppertime.co.uk/blogmywiki/2015/04/updated-list-of-bbc-network-radio-urls/ | |
# script inspired by https://gist.github.com/stengland/4052479 | |
STATIONS=( | |
radio1 radio1xtra radio2 radio3 | |
radio4fm radio4lw radio4extra | |
radio5live 6music asianet | |
cymru foyle nangaidheal scotlandfm | |
ulster walesmw | |
) | |
playradio() { | |
stream_url="http://bbcmedia.ic.llnwd.net/stream/bbcmedia_$1_mf_p" | |
echo "Using '$stream_url':" | |
# clear current queue | |
mpc clear | |
mpc add $stream_url && mpc play | |
} | |
main() { | |
select s in ${STATIONS[*]}; do | |
playradio "${s}" | |
break | |
done | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment