-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbbc
More file actions
executable file
·121 lines (100 loc) · 3.06 KB
/
Copy pathbbc
File metadata and controls
executable file
·121 lines (100 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
if [ "$1" == "-d" -a -n "$2" -a -n "$3" ]; then
out=1;
selection="$3"
elif [ "$1" == "-d" -a -n "$2" ]; then
out=2;
selection="$2"
else
selection="$1"
fi
case $selection in
"1" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_one.m3u8"
;;
"1x" )
station="-playlist http://www.bbc.co.uk/radio/listen/live/r1x.asx"
;;
"2" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_two.m3u8"
;;
"3" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_three.m3u8"
;;
"4" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8"
;;
"4x" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_four_extra.m3u8"
;;
"5" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_five_live.m3u8"
;;
"6" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8"
;;
"scot" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_scotland_fm.m3u8"
;;
"gael" )
station="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_nan_gaidheal.m3u8"
;;
"world" )
station="http://bbcwsen-lh.akamaihd.net/i/WSEIEUK_1@189911/master.m3u8"
;;
"one" )
get_iplayer --stream --modes=best --type=livetv 80003 --player="mplayer -cache 128 -" 2>/dev/null
exit
;;
"two" )
get_iplayer --stream --modes=best --type=livetv 80006 --player="mplayer -cache 128 -" 2>/dev/null
exit
;;
"three" )
get_iplayer --stream --modes=best --type=livetv 80005 --player="mplayer -cache 128 -" 2>/dev/null
exit
;;
"four" )
get_iplayer --stream --modes=best --type=livetv 80001 --player="mplayer -cache 128 -" 2>/dev/null
exit
;;
"news" )
get_iplayer --stream --modes=best --type=livetv 80002 --player="mplayer -cache 128 -" 2>/dev/null
exit
;;
"lbc" )
mplayer -playlist http://media-ice.musicradio.com/LBCUK.m3u 2> /dev/null;
exit
;;
"--list" )
echo "usage: bbc [station].";
echo "List of available radio stations:";
echo " BBC Radio [1]";
echo " BBC Radio [1x]tra";
echo " BBC Radio [2]";
echo " BBC Radio [3]";
echo " BBC Radio [4]";
echo " BBC Radio [4x]tra";
echo " BBC Radio [5]";
echo " BBC Radio [6]";
echo " BBC [scot]land";
echo " BBC [world] Service";
echo " BBC Radio Nan [gael]";
echo " BBC [one]";
echo " BBC [two]";
echo " BBC [three]";
echo " BBC [four]";
echo " BBC [news]";
;;
* )
echo "ERROR: Invalid selection"
echo "usage: bbc [station]";
echo "Use --list to display list of available stations";
echo "";
;;
esac
if [ -n "$station" -a -n "$out" ]; then
echo "out";
elif [ -n "$station" ]; then
mplayer -cache 768 $station 2> /dev/null;
fi