Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Adding radio station with logo to Moode
#1
There are 2 steps to adding a radio station with logo to Moode.
To just add a radio station (if you do not care about a logo), you can stop after step 1.

1) Adding the station url
There are 2 ways to add a new station.

The first is going to the Moode player url, choose "browse", click on "RADIO"
click on the microphone icon and select "create new station".
You will now get an overlay window where you can add the name and the url for you station.
Press "save" and your new station is there.


The second way of adding a station is a bit more involved. Here you have to make a .pls file that includes all the information regarding your station.
Once done, you can upload this per SSH to the Mode player. The location where you have to upload is: /var/lib/mpd/music/RADIO
Please note that you need root access to do so.
Once done, go to the Moode player url, go to "browse", click on the device icon in front of "RADIO" and select "Update this folder"

Now test your new radio station in Moode.
If you have music, it works, if not, check your url, and when you used the second route, check your .pls file.

2) Adding a logo

This bit is a bit more involved.
first, download the logo you want to use. If needed, convert it and save it as .png file. Name this file the same as your radio station.
Upload your .png file to your Moode player with SSH. The location where you upload is: /var/www/images/radio-logos
Please note that you need root access to do so.

You now need to know the real url that your radio station uses.
To find this, go to the Moode url, and start playback of your radio station. On the playback page, select "audio info" from teh Moode menu (right top).
Copy the address behind "Source:" and save this for later use.

Now, add the data needed to the sqlite database that manages this.
Open the sql database (as root):

Code:
sqlite3 /var/local/www/db/moode-sqlite3.db

first add header info to the view, and list the existing entries to know what is in there and what should be the next id you can use

Code:
sqlite> .headers on

sqlite> select * from cfg_radio;

Now you know the last id, Station url, and you have the image of the station in place. You can now add a line to the sqlite database with this information.
This line will look like this:
Code:
insert into cfg_radio VALUES(id,'station url','station name','if exists:permalink otherwise:empty','local');

now, reboot your Moode.
You should now have your radio station available with logo.
Reply
#2
Nice how-to guide for others to follow. I am sure its going to help a lot of users
<marquee behavior="alternate" scrolldelay=150
~~~~>>>Please always follow rules and read before you post<<<~~~~

</marquee>
Reply
#3
A question. How do you rewrite/fix something if you did a typo when adding info into database? Like I had an typo in URL so I need to remove line and add it again or just fix it
<marquee behavior="alternate" scrolldelay=150
~~~~>>>Please always follow rules and read before you post<<<~~~~

</marquee>
Reply
#4
To update the column that contains the station url:

Code:
sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_radio set station='http://......' where name='the_name_of_the_station'"

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(04-23-2018, 11:18 AM)Tim Curtis Wrote: To update the column that contains the station url:

Code:
sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_radio set station='http://......' where name='the_name_of_the_station'"

-Tim

Nice one ;Wink
Thanks
<marquee behavior="alternate" scrolldelay=150
~~~~>>>Please always follow rules and read before you post<<<~~~~

</marquee>
Reply
#6
(04-23-2018, 11:56 AM)rikardo1979 Wrote:
(04-23-2018, 11:18 AM)Tim Curtis Wrote: To update the column that contains the station url:

Code:
sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_radio set station='http://......' where name='the_name_of_the_station'"

-Tim

Nice one ;Wink
Thanks


or if you know the ID of your entry:
Code:
sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_radio set station='http://....' where id=123"

Hendrik-Jan
Reply
#7
(04-23-2018, 12:28 PM)hjheins Wrote:
(04-23-2018, 11:56 AM)rikardo1979 Wrote:
(04-23-2018, 11:18 AM)Tim Curtis Wrote: To update the column that contains the station url:

Code:
sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_radio set station='http://......' where name='the_name_of_the_station'"

-Tim

Nice one ;Wink
Thanks


or if you know the ID of your entry:
Code:
sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_radio set station='http://....' where id=123"

Hendrik-Jan

Always good to have more options Wink
<marquee behavior="alternate" scrolldelay=150
~~~~>>>Please always follow rules and read before you post<<<~~~~

</marquee>
Reply
#8
I try to add a station log as described but fails becasue of a ro squashfs filesystem:

Code:
pi@moode:~/radio-logos $ sudo mv ABC\ Radio\ Sydney.png /var/www/images/radio-logos/
mv: inter-device move failed: 'ABC Radio Sydney.png' to '/var/www/images/radio-logos/ABC Radio Sydney.png
unable to remove target: Read-only file system
Is there an easier way to implement this via a symlink to /home/pi/ for example?
Reply
#9
Seems like your error is not actually writing the logo, but removing it from your home.
Maybe do this one easier:
use "sudo bash" to become root on a console.
Now do a "cp" instead of a move.

does this work?
Reply
#10
On moode 4.2, just add also thumb image 100x100 on thumbs subdirectory on radio-logos directory. Repeat it as describe on post 1 for the radio-logos on thumbs one.
Reply


Forum Jump: