# \<solved\> How to persist radio stations?

**URL:** https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172
**Category:** Pi MusicBox (archive)
**Created:** [September 14, 2014, 11:40am UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172 "2014-09-14T11:40:11Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![slowjoe007](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@slowjoe007](https://discourse.mopidy.com/u/slowjoe007)
#### Post date: [September 14, 2014, 11:40am UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/1 "2014-09-14T11:40:12Z")

</div>

Hi,  
when I enter a radio station on the `Radio` page of Pi MusicBox, it is played, but on a restart this radio station is gone.

Also, the newly added station only is listed in the browser that I used to add it. Opening the Pi MusicBox pages on a different computer shows the radio station in `Now Playing`, but not in `Radio`.

This is somehow expected behavior, because of this statement that you can read on the `Radio` page:

> The last 25 stations are saved locally (not on the server yet).

There are 8 pre-configured radio stations listed on `Radio`. These must be defined somewhere. So, I searched my Pi MusicBox for a file that contains the URL of a radio station that is pre-configured. My search (`find / ! -type d -exec grep -H vprbbc24 {} \; 2> /dev/null`, “vprbbc24” is a token of the URL of the “BBC WorldService” streaming URL) listed `/boot/config/radiostations.js` and `/opt/webclient/js/radiostations.js`. The latter is a symlink to the first one, which perfectly makes sense.

I edited `/boot/config/radiostations.js` using `nano` directly on the RaspBerry Pi. I put `//` in front of all existing all existing stations and added new lines for my own. But it makes no difference to page `Radio`. I even rebooted the Raspberry Pi – to no avail: Page `Radio` still looks I didn’t change anything… File `radiostations.js` is not resetted by a reboot. I still see the radio stations listed that I entered before.

Content of `/boot/config/radiostations.js` on my system:

> root@MusicBox:~# cat /boot/config/radiostations.js  
> /\*\*

- Default Radiostations which appear in the webinterface. Edit if you like.
- Take care when editting. Only edit the stuff between ‘’
- And don’t use the default Windows Notepad for this (use Notepad++ on Windows)  
\*/

> 

var radioStations = ;  
//fill with defaults  
// radioStations.push([‘NPR 24’, ‘[http://nprdmp.ic.llnwd.net/stream/nprdmp\_live01\_mp3](http://nprdmp.ic.llnwd.net/stream/nprdmp_live01_mp3)’]);  
// radioStations.push([‘3FM Dutch’, ‘[http://icecast.omroep.nl/3fm-bb-mp3](http://icecast.omroep.nl/3fm-bb-mp3)’]);  
// radioStations.push([‘BBC WorldService’, ‘[http://vprbbc.streamguys.net:8000/vprbbc24.mp3](http://vprbbc.streamguys.net:8000/vprbbc24.mp3)’]);  
// radioStations.push([‘Arrow Jazz’, ‘[http://81.173.3.132:8082](http://81.173.3.132:8082)’]);  
// radioStations.push([‘PBS Australia’, ‘[http://eno.emit.com:8000/pbsfm\_live\_64.mp3](http://eno.emit.com:8000/pbsfm_live_64.mp3)’]);  
// radioStations.push([‘Groove Salad - Soma FM’, ‘[http://somafm.com/groovesalad.pls](http://somafm.com/groovesalad.pls)’]);  
// radioStations.push([‘Kiss FM Berlin’, ‘[http://stream.kissfm.de/kissfm/mp3-128/internetradio/](http://stream.kissfm.de/kissfm/mp3-128/internetradio/)’]);  
// radioStations.push([‘Pinguin Radio’, ‘[http://pr320.pinguinradio.com/listen.pls](http://pr320.pinguinradio.com/listen.pls)’]);  
radioStations.push([‘FRITZ! vom rbb’, ‘[http://rbb-mp3-fritz-m.akacast.akamaistream.net/7/799/292093/v1/gnl.akacast.akamaistream.net/rbb\_mp3\_fritz\_m](http://rbb-mp3-fritz-m.akacast.akamaistream.net/7/799/292093/v1/gnl.akacast.akamaistream.net/rbb_mp3_fritz_m)’]);  
radioStations.push([‘FRITZ! vom rbb (Alternative)’, ‘[http://rbb.ic.llnwd.net/stream/rbb\_fritz\_mp3\_m\_a](http://rbb.ic.llnwd.net/stream/rbb_fritz_mp3_m_a)’]);  
radioStations.push([‘Deutschlandfunk’, ‘[http://www.dradio.de/streaming/dlf\_hq\_ogg.m3u](http://www.dradio.de/streaming/dlf_hq_ogg.m3u)’]);  
radioStations.push([‘Deutschlandradio Kultur’, ‘[http://www.dradio.de/streaming/dkultur\_hq\_ogg.m3u](http://www.dradio.de/streaming/dkultur_hq_ogg.m3u)’]);  
radioStations.push([‘Deutschlandradio Wissen’, ‘[http://www.dradio.de/streaming/dradiowissen\_hq\_ogg.m3u](http://www.dradio.de/streaming/dradiowissen_hq_ogg.m3u)’]);  
radioStations.push([‘SWR3’, ‘[http://mp3-live.swr3.de/swr3\_m.m3u](http://mp3-live.swr3.de/swr3_m.m3u)’]);  
radioStations.push([‘SWR2’, ‘[http://mp3-live.swr.de/swr2\_m.m3u](http://mp3-live.swr.de/swr2_m.m3u)’]);  
radioStations.push([‘SWR Info’, ‘[http://mp3-live.swr.de/swrinfo\_m.m3u](http://mp3-live.swr.de/swrinfo_m.m3u)’]);

It is quite tedious to enter the streaming URLs each time I want to listen to my favorite radio station.  
Advices are greatly appreciated!

Thanks in advance,

slowjoe

---

<div class="post-metadata">

### Author: ![woutervanwijk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/woutervanwijk/32/15_2.png) [@woutervanwijk](https://discourse.mopidy.com/u/woutervanwijk)
#### Post date: [September 14, 2014, 3:39pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/2 "2014-09-14T15:39:36Z")

</div>

This should work indeed. Did you clear the cache of the browser? I created the symlink to make it easy to edit the radiostations.js on the SD-card, for non-Linux-users.

---

<div class="post-metadata">

### Author: ![slowjoe007](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@slowjoe007](https://discourse.mopidy.com/u/slowjoe007)
#### Post date: [September 14, 2014, 6:30pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/3 "2014-09-14T18:30:59Z")

</div>

Oh, indeed, cleaning out all historic information in Firefox did the trick.  
Thanks a ton, Wouter!

---

<div class="post-metadata">

### Author: ![sunni2002yout](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sunni2002yout](https://discourse.mopidy.com/u/sunni2002yout)
#### Post date: [December 21, 2014, 4:46pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/4 "2014-12-21T16:46:18Z")

</div>

Hi slowjoe,

I also wanted to edit the default radiostations. I found the file in

```
/usr/local/lib/python2.7/dist-packages/mopidy_musicbox_webclient/static/js/streamuris.js

```

But if i changed the file, in the webinterface nothing changed. I deleted all browserdata and restarted the service … but nothing happens. Do you have any idea?

---

<div class="post-metadata">

### Author: ![slowjoe007](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@slowjoe007](https://discourse.mopidy.com/u/slowjoe007)
#### Post date: [December 21, 2014, 7:09pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/5 "2014-12-21T19:09:13Z")

</div>

According to the file that you are referring to, I assume that you are not using Pi Musicbox, are you?  
At least, I modified a different file. Is there no ‘radiostations.js’ on your system?

Usually a browser allows to force reloads of all data, e.g. by pressing Ctrl + F5. This should help as well.

---

<div class="post-metadata">

### Author: ![sunni2002yout](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sunni2002yout](https://discourse.mopidy.com/u/sunni2002yout)
#### Post date: [December 22, 2014, 5:05pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/6 "2014-12-22T17:05:56Z")

</div>

Hi slowjoe,

Thx for your input.  
Now it works!

thx

---

<div class="post-metadata">

### Author: ![slowjoe007](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@slowjoe007](https://discourse.mopidy.com/u/slowjoe007)
#### Post date: [March 12, 2015, 7:46pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/7 "2015-03-12T19:46:35Z")

</div>

When redoing the system starting with a plain MusicBox 0.5.3 image I noticed the following:

- `radiostations.js` is called `streamuris.js` in version 0.5.3. @sunni2002yout already referred to this new filename.
- Firefox stores a cookie named `streamuris` (or similar), which needs to be cleared. For some reason in the MusicBox web UI key handlers seem to interfere with common keyboard strokes like ‘Ctrl + F5’. I cannot trigger a full refresh of the page by pressing ‘Ctrl + F5’!

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [March 12, 2015, 8:39pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/8 "2015-03-12T20:39:33Z")

</div>

I think I merged a fix from someone for key handling in Firefox so that  
should be fixed in the next version of musicbox-webclient.

---

<div class="post-metadata">

### Author: ![Zilverdael](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/zilverdael/32/575_2.png) [@Zilverdael](https://discourse.mopidy.com/u/Zilverdael)
#### Post date: [April 18, 2017, 12:44pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/9 "2017-04-18T12:44:54Z")

</div>

Has the file been moved in the past 2 years? Because it’s not there ☹  
I would love to edit the list as well, but can’t seem to find the file.  
The command to find the string stated by TS is running for 3 hours now without any result.

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [April 18, 2017, 1:02pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/10 "2017-04-18T13:02:21Z")

</div>

Yes, see the release notes for details [https://github.com/pimusicbox/pimusicbox/releases/tag/v0.7.0RC3](https://github.com/pimusicbox/pimusicbox/releases/tag/v0.7.0RC3)

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [April 18, 2017, 1:03pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/11 "2017-04-18T13:03:19Z")

</div>

You can also edit the list from the streams menu in the webclient. If you have further problems please start a new thread.

---

<div class="post-metadata">

### Author: ![ryks1](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/ryks1/32/1131_2.png) [@ryks1](https://discourse.mopidy.com/u/ryks1)
#### Post date: [December 29, 2018, 12:11pm UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/12 "2018-12-29T12:11:14Z")

</div>

guys to edit first you should get the putty on pc (win 10)/search on the phone with an app called network scanner your pimusicbox ip /enter in putty /login with name-root password musicbox /in the console type sudo mc /search in music a file at the bottom called playlist/enter in that/than you have radio streams /f4 on that/edit and save with ctrl+x and y  
have fun ,ryks

---

<div class="post-metadata">

### Author: ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)
#### Post date: [February 19, 2026, 11:47am UTC](https://discourse.mopidy.com/t/solved-how-to-persist-radio-stations/172/13 "2026-02-19T11:47:00Z")

</div>


