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
#38
(04-22-2018, 08:55 PM)hjheins Wrote: 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.

Hi, 
The above procedure doesn't seem to work in Moode 7.01 for a whole bunch of stations. Moode 7.01 does not accept the stations backup file I created with 6.7. How would the above procedure work in 7.01? I copied all the radio stations to the relevant directories, did same for the logo's etc. I also tried mpc:


Code:
sudo mpc rescan (or update) <path> 
or just plain
sudo mpc rescan
sudo mpc update

with or without path results in the infamous "Malformed path" error. There's no submenu beside the microphone in the UI, Browse etc. Could you please adapt the above procedure for v7.01? 

Thanks!
Reply


Messages In This Thread
RE: Adding radio station with logo to Moode - by RPI4 Rambler - 01-07-2021, 11:18 AM

Forum Jump: