I recently came across this script for streaming radio written in Spanish and using Spanish stations, but it looks to be quite easy to adapt it to English stations. If I knew Spanish it would be very good, but its an interesting item showing another way of getting streaming radio but this time using 'mplayer' as its backend.

 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
#!/usr/bin/env bash

#Emisoras

SER="http://194.169.201.177:8085/liveser.mp3"
AWESOME80="http://uplink.duplexfx.com:8000"
LITE80="http://uplink.duplexfx.com:8040"
HAIRBAND="http://uplink.duplexfx.com:8014"
THEHEART="http://uplink.duplexfx.com:8006"
BEATLES="http://uplink.duplexfx.com:8062"
GOODTIMEOLDIES="http://uplink.duplexfx.com:8046"
CLASSICALGUITAR="http://uplink.duplexfx.com:8020"

#Comprobar mplayer instalado
PLAYER=$(which mplayer 2> /dev/null)
if [ -z "$PLAYER" ]; then
printf "Instala mplayer!\n"
exit 1
fi

DIALOG=$(which dialog 2> /dev/null)
if [ -z "$DIALOG" ]; then
printf "Instala dialog!\n"
exit 1
fi

#Terminar con mplayer
killall 2> /dev/null "$PLAYER"

#Seleccionar emisora
EMISORA=$($DIALOG --stdout --title "Radio" --radiolist "Emisoras" 0 0 0 "Cadena SER" "" ON "Awesome
80's" "" OFF "Lite 80's" "" OFF "80's Hairband" "" OFF "The Heart" "" OFF "Beatles" "" OFF "Good
Time Oldies" "" OFF "Classical Guitar" "" OFF)

clear

case $EMISORA in
"Cadena SER")
printf "Playing Cadena SER\n"
"$PLAYER" 2>/dev/null "$SER" ;;
"Awesome 80's")
printf "Playing Awesone 80's\n"
"$PLAYER" 2>/dev/null "$AWESOME80" ;;
"Lite 80's")
printf "Playing Lite 80's\n"
"$PLAYER" 2>/dev/null "$LITE80" ;;
"80's Hairband")
printf "Playing 80's Hairband\n"
"$PLAYER" 2>/dev/null "$HAIRBAND" ;;
"The Heart")
printf "Playing The Heart\n"
"$PLAYER" 2>/dev/null "$THEHEART" ;;
"Beatles")
printf "Playing Beatles\n"
"$PLAYER" 2>/dev/null "$BEATLES" ;;
"Good Time Oldies")
printf "Playing Good Time Oldies\n"
"$PLAYER" 2>/dev/null "$GOODTIMEOLDIES" ;;
"Classical Guitar")
printf "Playing Classical Guitar\n"
"$PLAYER" 2>/dev/null "$CLASSICALGUITAR" ;;
*)
printf "No se ha encontrado la emisora.\n" ;;
esac

exit 0


Comments

comments powered by Disqus