summaryrefslogtreecommitdiffstats
path: root/.local/bin/radio
blob: f9b65870a5be5f768de4c6ff658e1a3ed856d8ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

station="$1"
function _play() { mpv --no-video "$@"; }

if [[ $station =~ youtube ]]; then _play "$1"
elif [[ $station =~ 00s ]]; then _play "https://ais.absoluteradio.co.uk/absolute00shigh.aac"
elif [[ $station =~ 10s ]]; then _play "https://ais.absoluteradio.co.uk/absolute10shigh.aac"
elif [[ $station =~ 20s ]]; then _play "https://stream-mz.planetradio.co.uk/webcast3high.aac"
elif [[ $station =~ 60s ]]; then _play "https://ais.absoluteradio.co.uk/absolute60shigh.aac"
elif [[ $station =~ 70s ]]; then _play "https://ais.absoluteradio.co.uk/absolute70shigh.aac"
elif [[ $station =~ 80s ]]; then _play "https://ais.absoluteradio.co.uk/absolute80shigh.aac"
elif [[ $station =~ 90s ]]; then _play "https://ais.absoluteradio.co.uk/absolute90shigh.aac"
elif [[ $station =~ absolute ]]; then _play "https://ais.absoluteradio.co.uk/absoluteradiohigh.aac"
elif [[ $station =~ bandit ]]; then _play "https://p11.p4groupaudio.com/P11_MM"
elif [[ $station =~ classic ]]; then _play "https://ais.absoluteradio.co.uk/absoluteclassicrockhigh.aac"
elif [[ $station =~ lofi ]]; then _play "https://www.youtube.com/watch?v=5qap5aO4i9A"
elif [[ $station =~ p6 ]]; then _play "https://p6.p4groupaudio.com/P06_MM"
elif [[ $station =~ planet ]]; then _play "https://stream-mz.planetradio.co.uk/planetrock.aac"
elif [[ $station =~ sam ]]; then _play "https://stream-mz.planetradio.co.uk/net1bristol.aac"
elif [[ $station =~ x ]]; then _play "https://media-ssl.musicradio.com/RadioXUK"
else printf "Stations available:\n%s" "$(awk '/^elif/ {print $5}' "$0" | sort | tr "\n" " ")" ; fi