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
#31
(09-15-2018, 11:48 AM)remy1961 Wrote:
(09-15-2018, 11:20 AM)j.j.p Wrote: Hi Tim,

I am a new moodeaudio user.
I can't see a microphone icon on RADIO tab to add new station...

What's wrong?

Thanks..
Hi. First you click on any radio station. You will see a menu. One of the menu item will be "create new station".
Remy
Thank you Remy !!
Reply
#32
(08-27-2018, 08:13 PM)Wominator Wrote: Edit: Updates of MPD, Rescan of the Music Sources and Reset the Music Library didn't do the trick. Still the old logos, allthough they are deleted and replaced by other logos with same name. 

Oh, btw: Safari on iPhone 7 with newest iOS, Android, no problem:

You should probably clear the cache of your browser.


@hjheins  Thank you for the tutorial ! Very helpful !

A few comments though:
- if you use 'local' images, don't use .png, but use .jpg images instead (both in radio-logos, and in radio-logos/thumbs) otherwise it won't work
- for thumbs, you don't need to add an entry in the sqlite database, this is required only for 'art cover' on the playback page
Reply
#33
Hi! 

I'm trying to follow the instructions, but I'm new to SSH.

I got so far that I instald Putty on my Windows 10 PC, loged in to moode with pi@192.168.1.88 password moodaudio.

First problem, when I try to change directory and list files, I can see the var/www folder but I can not change directory to it.
Propably because I need root rights?
How can I get root rights?

Also I don't know how to make the right command for copying from PC in Putty?
Is it something like: sudo cp c://folder/*.* /var/www/images/radio-logos   ?

I tried different ways to copy files to moode, WinSCP but trying to copy I get "Permission denied"


So how can I get root rihgts and what is the corret command pointing from my PC to the radio-logos folder?

Thanks in advance
Reply
#34
Hello
In my moode on raspberry, define a new Radio Station. I follow howto install icons. Copy the jpg's in radio-icons and thumb dir.
But it isn't showed in playback site! Press update DB or reboot no change...
It needs sqlite entries?
Reply
#35
I'm running moOde 6.3.0. I wanted to add Radio Paradise's eclectic mix. Here's what I did:

From my PC running Windows 10 and Firefox I browsed to my moOde player, clicked the microphone icon to get to the radio stations screen. Click the '+' sign to add a new station.
Type the name of the station, and enter the stream URL, in this case I went to https://radioparadise.com/listen/stream-links and chose the 320k Eclectic Mix stream. Right click on the stream name and choose "copy link location".
Paste that into the URL field in moOde's add station dialogue.

For the logo I saved the existing Radio Paradise logo from moOde and edited it in Photoshop to add "eclectic mix" to the logo and saved it under a different filename. I then cliicked on the Logo "Choose" button and selected the logo file. After updating the MPD Database the new station is there and working! Provided you have the correct stream URL this should work for any station I guess, and doesn't involve delving into moOde's innards.

[url=https://radioparadise.com/listen/stream-links][/url]
Reply
#36
(12-01-2019, 03:17 PM)duracell80 Wrote: It would be really helpful to lift the restriction on png images. JPEG's can't have transparency. Usecase would be knock out white logos where if the theme changed the background color of the logo could change too.

We don't need SVG, but not allowing PNG seems a bit crazy.

You would need to weigh the importance to users of the particular feature (transparency) with the effort required to add PNG as an allowable image type for Radio logos. I haven't looked at what might be required. Keep in mind that features compete with one another for limited developer time, and they compete with bug fixes and OS/kernel upgrades.

The relevant code blocks are 

https://github.com/moode-player/moode/bl...ayerlib.js
function importLogoImage(files) {

https://github.com/moode-player/moode/bl...worker.php
case 'setlogoimage': 
It uses the PHP Image functions
https://www.php.net/manual/en/ref.image.php.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#37
Adding stations w/logos is easy, just not bulk adding them cos there is no built-in feature to do bulk add/remove although it's been on the TODO list for a long time.

The enhancements you are working are super nice but our project is small and there is only a limited amount of dev resource to integrate things into the moOde code base and build UI's for them.

Fork and PR is best way to get these enhancements into the code base :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#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
#39
Hi
Is it possible to add a screenshot of the first step.

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.

Regards
Reply
#40
Never mind, I finally found out how to do it.

Regards
Reply


Forum Jump: