![Geek :geek:](./images/smilies/icon_e_geek.gif)
What's the easiest way to add internet radio station?
Re: What's the easiest way to add internet radio station?
ilinux, you are awesome. Thank you for contributing this, I will have to test it out on my radio. ![Geek :geek:](./images/smilies/icon_e_geek.gif)
![Geek :geek:](./images/smilies/icon_e_geek.gif)
Jeff Keyzer
http://mightyohm.com
http://mightyohm.com
Re: What's the easiest way to add internet radio station?
Hi,
I made also an m3u version
My script is located here: http://www.sandrofabbro.com/wrtradio/scripts/mpc_m3u
To install:
wget http://www.sandrofabbro.com/wrtradio/scripts/mpc_pls -O /usr/bin/mpc_m3u
chmod +x /usr/bin/mpc_m3u
To use:
mpc_m3u http://www.tv-radio.com/station/france_ ... 3-128k.m3u
It will add the first url to mpd.
Run it before mpc play
I made also an m3u version
My script is located here: http://www.sandrofabbro.com/wrtradio/scripts/mpc_m3u
To install:
wget http://www.sandrofabbro.com/wrtradio/scripts/mpc_pls -O /usr/bin/mpc_m3u
chmod +x /usr/bin/mpc_m3u
To use:
mpc_m3u http://www.tv-radio.com/station/france_ ... 3-128k.m3u
It will add the first url to mpd.
Run it before mpc play
Re: What's the easiest way to add internet radio station?
I'm looking for these two scripts (pls, m3u), too. but the link to the scripts isn't working anymore. where can I find it? or does someone else have these scripts to share? thanks
Re: What's the easiest way to add internet radio station?
this seems to work too:
combining it into a nice script is up to you.
Code: Select all
url=`wget --quiet http://listen.di.fm/public3/vocaltrance.pls -O - | grep -o -m1 'http://.*'`
mpc add $url
Re: What's the easiest way to add internet radio station?
I found some script code by ilinux here in the forum and made my own script out of it.
with this you can add all url and if it is a m3u or a pls it will parse it and add the content.
you can get the script by:
wget http://www.dddesign.ch/Js_retroplayer/mpc_add
or copy/paste this code:
with this you can add all url and if it is a m3u or a pls it will parse it and add the content.
you can get the script by:
wget http://www.dddesign.ch/Js_retroplayer/mpc_add
or copy/paste this code:
Code: Select all
#!/bin/sh
if [ "$1" != "" ] ; then
suffix=${1##*.}
if [ "$suffix" = "mp3" ] ; then
echo "it's a 'mp3' file"
mpc add $1
else
#Fake useragent
alias wget='wget -U "Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7"'
#Download parse and add to mpd
#result=$(wget -q $1 -O-)
#echo "$result"
if [ "$suffix" = "pls" ] ; then
echo "it's a 'pls' file"
wget -q $1 -O- | grep "File1=" | sed -e 's/^File[1]*=//' | tr -d "\r" | mpc add
elif [ "$suffix" = "m3u" ] ; then
echo "it's a 'm3u' file"
wget -q $1 -O- | cat | xargs -r mpc add
else
echo "file suffix not know, try it anyway"
mpc add $1
fi
fi
else
echo "USAGE: mpc_add http://www.example.com/file.mp3"
echo "USAGE: can add url to .mp3 .m3u .pls"
fi