Thank you for your donation!


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


Official moOde 7.0.1 support thread
I noticed on my iphone that the PREV track icon does not always show


Attached Files Thumbnail(s)
   
Reply
Its thrifted to allow for more space for title text. I think most players these days only have play and next on mobile layouts.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
First of all: Congrats, Tim, for the new version! And best to all for 2021!

I do have a problem though with 7.01 on my RPI4, though. It concerns the RADIO section. I made a backup "Stations.zip" for my library of internet radio stations with the previous Moode version. After installing 7.01 in the usual way, I tried to import (restore) my radio database through the UI (Import...). It didn't work and got a "schema mismatch" error. I should mention that I haven't yet added any other music sources to Moode, as they are too big.

So I searched the forum and found this:

Quote: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.


Sadly, this doesn't work in 7.01. So I copied my previous stations (from a complete backup of my previous Moode installation) by hand to:

Code:
/var/lib/mpd/music/RADIO

I did the same with the logos to their destination:

Code:
/var/local/www/imagesw/radio-logos

That all worked OK. But none of my 'own' stations are displayed on the Radio page in the UI. I tried to add one of my stations by hand, but I got a 'duplicate' error. So Moode seems to be aware of the stations but won't display them in the UI. I tried updating, both in the UI and through SSH (mpc) with zero results. Because there are quite a few of stations, a bulk approach is preferable; besides, the manual entry fails anyway.
Manually adding playlists by copying them to the appropriate directories works fine, though.

My question, therefore, is what did I do wrong and how to fix this. Also, why doesn't hjheins's  procedure work anymore? Would deleting the files

Code:
cfg_radio.csv
cfg_radio.schema

help, so Moode would correct the situation, by generating the then missing files correctly?

BTW Off topic: the Topping E30 USB DAC works excellent with RPI4/Moode, including native DSD. 

Any help will be greatly appreciated!

Cheers, marco
Reply
@RPI4 Rambler 

Hi, Marco.

The first Rule of Holes is, when you find yourself in one, stop digging.

I wrote a pair of Python scripts a while ago which facilitated saving the user-created radio entries from one 6.7.1 player and loading them into another 6.7.1 player. Recently I added another load script specifically so one could load stations saved from 6.7.1 into a 7.0.x player. See my moode-radio-utils github repo and both its README and README7 files. (Note that I have not yet updated the repo generally for 7.0.x work.)

These scripts are not part of moOde and the file they save and load is not the same as the export file created by moOde.

With 7.0.x, the database radio station schema changed to accommodate new features, which is why you see the error when you tried to import the 6.7.1 stations. (An additional thumbnail image of each station's logo is needed as well.) The procedure written by hjheins predates these changes, which is why you got into your muddle.

If you still have your 6.7.1 image I'd just boot that and run my Python scripts. If you don't, give me a day and I'll see if I can come up with a way to load your existing export file.

Regards,
Kent
Reply
(01-08-2021, 01:55 AM)Britracer Wrote: I noticed on my iphone that the PREV track icon does not always show

(01-08-2021, 02:39 AM)Tim Curtis Wrote: Its thrifted to allow for more space for title text. I think most players these days only have play and next on mobile layouts.

It is still there on the full playback screen, just not on the playbar.
----------------
Robert
Reply
(01-08-2021, 02:22 PM)TheOldPresbyope Wrote: @RPI4 Rambler 

Hi, Marco.

The first Rule of Holes is, when you find yourself in one, stop digging.

I wrote a pair of Python scripts a while ago which facilitated saving the user-created radio entries from one 6.7.1 player and loading them into another 6.7.1 player. Recently  I added another load script specifically so one could load stations saved from 6.7.1  into a 7.0.x player. See my moode-radio-utils github repo and both its README and README7 files. (Note that I have not yet updated the repo generally for 7.0.x work.)

These scripts are not part of moOde and the file they save and load is not the same as the export file created by moOde.

With 7.0.x, the database radio station schema changed to accommodate new features, which is why you see the error when you tried to import the 6.7.1 stations. (An additional thumbnail image of each station's logo is needed as well.) The procedure written by hjheins predates these changes, which is why you got into your muddle.

If you still have your 6.7.1 image I'd just boot that and run my Python scripts. If you don't, give me a day and I'll see if I can come up with a way to load your existing export file.

Regards,
Kent
 
@TheOldPresbyope

Thanks so much Kent, I really appreciate it. I'm like a Smooth Fox Terrier, I love digging holes! In this case not so much though. I'll check the status of my old system first; if I can find it among my many microSD cards and backups. But I'll check out your moode-radio-utils in any case. I'll keep you posted. I did copy all stations logos and their thumbnails so that's all present. Perhaps it would be good to have an updated version of Heins' procedure anyhow, if he is still involved with Moode. 

Thanks again & best regards,
Marco
Reply
(01-07-2021, 01:53 PM)acidsun Wrote: PS It works perfectly fine for more then a year - what was changed? iOS upgrade to 14 and Moode from 6.4.2 to 7.01.

Sounds very similar to my situation. Every day I lose the connection with the Pi and both the web service and SSH fail. I just have to wait for up to 20 minutes and they will both start to work again. No need for a restart.
Reply
(01-08-2021, 02:22 PM)TheOldPresbyope Wrote: @RPI4 Rambler 

Hi, Marco.

The first Rule of Holes is, when you find yourself in one, stop digging.

I wrote a pair of Python scripts a while ago which facilitated saving the user-created radio entries from one 6.7.1 player and loading them into another 6.7.1 player. Recently  I added another load script specifically so one could load stations saved from 6.7.1  into a 7.0.x player. See my moode-radio-utils github repo and both its README and README7 files. (Note that I have not yet updated the repo generally for 7.0.x work.)

These scripts are not part of moOde and the file they save and load is not the same as the export file created by moOde.

With 7.0.x, the database radio station schema changed to accommodate new features, which is why you see the error when you tried to import the 6.7.1 stations. (An additional thumbnail image of each station's logo is needed as well.) The procedure written by hjheins predates these changes, which is why you got into your muddle.

If you still have your 6.7.1 image I'd just boot that and run my Python scripts. If you don't, give me a day and I'll see if I can come up with a way to load your existing export file.

Regards,
Kent

@Kent,

So I took your advice, reinstalled the 6.7 version and did all the stuff described in moode-radio-utils on GitHub, culminating in the file myradios.tar.gz. After installing 7.01 again, finally, the big moment, and this is what happened:

Code:
pi@moode:~/moode-radio-utils $ sudo python3 loadmyradios7.py
 File "loadmyradios7.py", line 7
   <!DOCTYPE html>
   ^
SyntaxError: invalid syntax

Now, remembering your advice on digging holes, I decided not to go digging but post the results instead. Is the command line missing a parameter or some such? Furthermore, the archive file, being 81 KB in size, can't be opened by any archiver (7Zip, Peazip etc.) or is "empty". 

However, as all required files (radiostations, logos, podcasts) are present on the 7.01 system, in

Code:
/var/lib/mpd/music/RADIO
/var/local/www/imagesw/radio-logos
/var/local/www/imagesw/radio-logos/thumbs
etc.

is there another way to make Moode them accessible? Or, use the original backup file from v6.7? I've noticed that when I export the current stations through the UI of v7.01, the resulting file DOES contain all the stations on the system, including the ones that are not displayed/accessible through the UI's Radio page. (Re)Importing that file, however, has no effect. And manually adding one of the "missing" files through the UI, results in a "duplicate entry" error.
I'm totally stumped here. Any ideas?

Cheers, Marco
Reply
@RPI4 Rambler 

There's no HTML markup like

Code:
<!DOCTYPE html>

in my scripts. Looks like you scraped the Python script from a web browser page or somesuch instead of downloading them.

My script saves a .tar.gz file. This is a compressed Linux tar (=tape archive) file. You need the right tool to open it. Typically the file will be rather small compared to moOde's exported stations.zip file because my scripts save only the user-defined stations.

I'm not going to respond in detail to the rest of your post. Mostly you seem to be getting the responses I'd expect from doing the wrong thing confidently.

If you've saved your moOde-exported file from moOde 6.7.1 and can wait a little longer, I'm finishing a hacked version of Tim's import_stations.sh script that will suck the file into 7.0.1 but it will do it ala moOde* rather than ala TheOldPresbyope-script way.

Remember, the behavior built into moOde is, on export, to save all the contents of the Radio directory and, on import, to delete the existing Radio directory and then load the saved one.

This means you lose any customization you did to the curated stations in 7.0.1 before importing the 6.7.1 directory.

Also, the script

1) will not identify any stations as being geo-referenced because 6.7.1 didn't save that information
2) will not adjust for stations whose names or URLs were updated between 6.7.1 and 7.0.1; you'll get the old version
3) will not adjust for changes in logos between 6.7.1 and 7.0.1; you'll get the old version
4) will not preserve stations in 7.0.1 which were not in 6.7.1; they simply will not be there.

These are all reasons why I wrote my separate scripts to deal solely with the user-defined stations. But that's the color of a different horse.


Regards,
Kent

*I like the sound of that. We could call this music player Pi à la moOde
Reply
(01-09-2021, 12:41 PM)lamode Wrote:
(01-07-2021, 01:53 PM)acidsun Wrote: PS It works perfectly fine for more then a year - what was changed? iOS upgrade to 14 and Moode from 6.4.2 to 7.01.

Sounds very similar to my situation. Every day I lose the connection with the Pi and both the web service and SSH fail. I just have to wait for up to 20 minutes and they will both start to work again. No need for a restart.

In my case I don't lose connection to Pi/Web Service/SSH - it's only a problem with AirPlay - still looking for a hint which logs I should check to try find out a reason.
Reply


Forum Jump: