-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » Tue Feb 25, 2014 7:47 am
You probably already know that I am sucker for 'dialog's in terminals. The following script needs a file in which you paste your favourite radio stream URLs
/usr/local/bin/bbqownradio
Code: Select all
#!/bin/bash
# BBQOWNRADIO
. /usr/share/doc/dialog/examples/setup-vars
. /usr/share/doc/dialog/examples/setup-tempfile
ar=()
while read n s ; do
ar+=($n "$s")
done < /usr/local/share/radiolist
dialog --clear --cancel-label "OFF" --menu "Stations" 0 0 0 "${ar[@]}" 2> $tempfile
retval=$?
case $retval in
$DIALOG_CANCEL)
killall mpg123 ; exit 0;;
esac
mpg123 -C -q -@ `cat $tempfile` &
reset
clear
echo "Now playing: `cat $tempfile`"
exit 0
and here is a sample file you can use as radiolist - no blank lines please!
/usr/local/share/radiolist
Code: Select all
http://mp3-live.swr.de/swr1bw_s.m3u
http://4broadcast.de/radioin.m3u
http://tranceradio.ch/listen.m3u
http://voxsc1.somafm.com:8600
http://www.friskyradio.com/frisky.m3u
http://shouthostdirect13.streams.bassdrive.com:8202
http://streamer-dtc-aa03.somafm.com:80/stream/1018
http://broadcast.infomaniak.ch/traxx002-low.mp3
http://broadcast.informaniak.ch/traxx003-low.mp
http://broadcast.informaniak.ch/traxx013-low.mp3
http://voxsc1.somafm.com:8300
http://voxsc1.somafm.com:8384
http://voxsc1.somafm.com:7000
http://voxsc1.somafm.com:8040
http://voxsc1.somafm.com:8062
http://voxsc1.somafm.com:8700
http://voxsc1.somafm.com:8900
http://voxsc1.somafm.com:8500
http://voxsc1.somafm.com:8090
http://voxsc1.somafm.com:2200
http://voxsc1.somafm.com:8880
http://webradio.radiof.de:8000/
http://www.dradio.de/streaming/dlf.m3u
http://205.164.62.21:8030/
http://www.coolradio.de/streams/cooljazz-128.m3u
http://www.jazzradio.net/docs/stream/jazzradio.pls
http://ams02.egihosting.com:5050/
http://air.radiolla.com/radiolla192k
http://air.radiolla.com/jiraffe192k
http://air.radiolla.com/volta192k
http://air.radiolla.com/equalyza192k
http://air.radiolla.com/ilma192k
Remember: sudo chmod a+x /usr/local/bin/bbqownradio
some random list: <removed due to bitching>
..gnutella..
-
brontosaurusrex
- Distrowatcher
- Posts: 2
- Joined: Mon Jul 22, 2013 5:27 pm
Unread post
by brontosaurusrex » Fri May 02, 2014 12:51 pm
Thanks for sharing this, I have added some buffering to the mpg123 line (-b 2000), but otherwise working as expected.
-
johnraff
- Sperminator
- Posts: 199
- Joined: Wed Oct 17, 2012 6:38 pm
- Location: Japan
-
Contact:
Unread post
by johnraff » Wed May 14, 2014 2:06 pm
[all he can do is poke holes in other peoples' work]
1)
Code: Select all
ar=()
while read n s ; do
ar+=($n "$s")
done < /usr/local/share/radiolist
I can't see any $n values appearing - radiolist only has 1 word per line - or am I missing something?
2)
no blank lines please!
http://link_removed has one.
All code is one.
-
rhowaldt
- Dog
- Posts: 4565
- Joined: Wed Oct 17, 2012 9:01 am
-
Contact:
Unread post
by rhowaldt » Thu May 15, 2014 8:22 am
^ :D
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
-
johnraff
- Sperminator
- Posts: 199
- Joined: Wed Oct 17, 2012 6:38 pm
- Location: Japan
-
Contact:
Unread post
by johnraff » Thu May 15, 2014 1:50 pm
@mb Thanks for all those streams though. Now to hack up a little thing to go through them all picking out the ones I want "next, next, next...OK, next..."
All code is one.
-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » Wed May 21, 2014 8:31 am
johnraff wrote:[all he can do is poke holes in other peoples' work]
1)
Code: Select all
ar=()
while read n s ; do
ar+=($n "$s")
done < /usr/local/share/radiolist
I can't see any $n values appearing - radiolist only has 1 word per line - or am I missing something?
2)
no blank lines please!
http://link-removed has one.
1) you can add a name in front, if you have time. I didn't ;)
2) removed list from server, thanks for the info.
..gnutella..
-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » Wed May 21, 2014 8:31 am
brontosaurusrex wrote:Thanks for sharing this, I have added some buffering to the mpg123 line (-b 2000), but otherwise working as expected.
Thanks for the info, I haven't played with buffering values yet.
..gnutella..
-
johnraff
- Sperminator
- Posts: 199
- Joined: Wed Oct 17, 2012 6:38 pm
- Location: Japan
-
Contact:
Unread post
by johnraff » Wed May 28, 2014 5:32 am
machinebacon wrote:removed list from server
Lucky I grabbed it quickly.
Recently some more nice radio stations seem to be appearing. I'll have to post a few of my favourites on that thread...
All code is one.