Thank you for your donation!


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


Official moOde 6.7.1 support thread
No worries, Francesco!

I was not reacting to your post. I was just expressing my opinion to Tim that moOde needn't bulk up with lots of Internet radio gimmickry. I expressed it clumsily.

Regards,
Kent
Reply
@fdealexa


PS - you're correct. I wrote the code a little over a year ago, just as mooOde 6.0.0 was hitting the street. Since then, the radio-logos directory got moved to /var/local/www/imagesw from its previous position /var/www/images. Sorry and thanks for mentioning it.

I need to update the repo. At a glance it looks like the fix will be simply:

Line 40 in savemyradios.py becomes

Code:
logosrc = '/var/local/www/imagesw/radio-logos/'


Line 39 in loadmyradios.py becomes

Code:
logodest = '/var/local/www/imagesw/radio-logos/'


You can try this now or you can wait 'til I update and test the repo.

Regards,
Kent
Reply
(08-22-2020, 03:11 PM)TheOldPresbyope Wrote: @fdealexa


PS - you're correct. I wrote the code a little over a year ago, just as mooOde 6.0.0 was hitting the street. Since then, the radio-logos directory got moved to /var/local/www/imagesw from its previous position /var/www/images. Sorry and thanks for mentioning it.

I need to update the repo. At a glance it looks like the fix will be simply:

Line 40 in savemyradios.py becomes

Code:
logosrc = '/var/local/www/imagesw/radio-logos/'


Line 39 in loadmyradios.py becomes

Code:
logodest = '/var/local/www/imagesw/radio-logos/'


You can try this now or you can wait 'til I update and test the repo.

Regards,
Kent

Thanks Kent,
I already did this yesterday on my own and the reason for my post was that there is something else in the record definition: 5 fields instead of 12.
I'm repeating it now simply (using your original file) to give you the result:


Code:
pi@moOde-FdA-Salone:~/moode-radio-utils $ sudo ./loadmyradios.py
Load user-defined radio stations from myradios.tar.gz  in the current working directory
Proceed? (y/n): y
adding station 'Grateful Dead Live at Carousel Ballroom - 1968'
Traceback (most recent call last):
 File "./loadmyradios.py", line 98, in <module>
   cur.execute("INSERT INTO cfg_radio VALUES (?,?,?,?,?)", (None, entry['station'], name, entry['type'], entry['logo']))
sqlite3.OperationalError: table cfg_radio has 12 columns but 5 values were supplied
pi@moOde-FdA-Salone:~/moode-radio-utils $
Thanks again and best regards,
Francesco
Reply
@Tim Curtis
@fdealexa

Re: importing radio stations

As expected, bumping the three configuration parameters for php and nginx to 50MB, poking the integrity check in the eye with a sharp stick, and rebooting, I was able to import the two biggest files provided to me. The attached screen capture shows logos of some of the DAB+ stations which were in the last file I imported.

Francesco, I don't recommend you try hand-editing the moOde internals; I'm sure this increase in import file capacity will show up in the next release. There will always be some limit, for the reasons Tim mentioned, but I think 50MB is a reasonable one.

Regards,
Kent


Attached Files Thumbnail(s)
   
Reply
(08-22-2020, 05:42 PM)TheOldPresbyope Wrote: @Tim Curtis
@fdealexa

Re: importing radio stations

As expected, bumping the three configuration parameters for php and nginx to 50MB, poking the integrity check in the eye with a sharp stick, and rebooting, I was able to import the two biggest files provided to me. The attached screen capture shows logos of some of the DAB+ stations which were in the last file I imported.

Francesco, I don't recommend you try hand-editing the moOde internals; I'm sure this increase in import file capacity will show up in the next release. There will always be some limit, for the reasons Tim mentioned, but I think 50MB is a reasonable one.

Regards,
Kent

Thanks Kent.
in the meantime you kindly tell me "what to do" for the parameters, I tried to change your Python code:
changing line 98 of loadmyradios.py, I got the insertion of your two radios.

Code:
cur.execute ("INSERT INTO cfg_radio VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", (None, entry ['station'], name, entry [ 'type'], item ['logo'], None, None, None, None, None, None, None))

Now I'd completely fix it, if you can send me the new record scheme (if you have it).
It probably is

Code:
(id, station, name, type, logo, genre, broadcaster, language, country, region, bitrate, audio format)

Thanks again,
Francesco
Reply
(08-22-2020, 05:27 PM)fdealexa Wrote:
(08-22-2020, 03:11 PM)TheOldPresbyope Wrote: @fdealexa

...
I need to update the repo. At a glance it looks like the fix will be simply:

...

Thanks Kent,
I already did this yesterday on my own and the reason for my post was that there is something else in the record definition: 5 fields instead of 12.
I'm repeating it now simply (using your original file) to give you the result:
...


Argh. That's what I get for taking a "ready, fire, aim" approach! I forgot Tim changed the schema as well as the file locations . I need to slow down, make a coffee, and review the code. Stay tuned.

Regards,
Kent
Reply
@fdealexa 

OK, so I've revised my save and load routines and tested them in a circuitous way.


1) used moOde's export function to save the original radio station entries in my moOde r6.7.1 player, which produces a 19MB stations.zip file.

2) used moOde's import function to load your 'stations (86) - 69 OUT.zip' file which is 23MB in size.

3) used my saveradios.py routine to save off the 69 user-defined stations from 2), which produces a 3.6MB myradios.tar.gz file.

4) used Tim's import function to import my previously exported stations.zip file from 1), which restores the radio directory to its original station entries.

5) used my loadradios.py routine to load the myradios.tar.gz file from 3). It says it loaded 69 stations. Yay.

I'll update my github repo after dinner. The repo is now updated. I used it to load the myradiofiles.tar.gz mentioned above into another mooOde 6.7.1 player.

Regards,
Kent
Reply
Hi Kent,
I have seen that you have updated the repo: thank you very much indeed.
Best regards,
Francesco
PS: of course thanks a lot to Tim too.
Reply
Another cosmetic thing I noticed.  In portrait view on mobile (I've seen it on both my Samsung Android and my wife's IOS) the list of tracks can remain visible behind the library view.  To reproduce:
Begin in the "Album view" and start playing an album. In "Now Playing" view in portrait orientation, scroll up slightly so the first few tracks of the playlist are showing, but the album art is also still on screen.  Then tap the album art to return to the library view.  Behind the album art in the lower quarter of the screen, the track list from the now playing screen is visible.

No functional issues with it, but it looks nasty.
----------------
Robert
Reply
I can repro. Fixed for upcoming 7 series release.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: