Thank you for your donation!


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


Radio Stations and Images sync
#7
@ghoeher

Hi, Georg.

If you can wait a couple more days I should have Python scripts ready for prime time which do the following:
  • in export mode, scan the moOde database for user-defined radio station entries; for each one extract the db info along with the corresponding .pls file, the station logo .jpg file and its thumbnail .jpg file (if the image files exist); save all to a tarball (e.g., a tar file).
  • in import mode, untar the tarball to a temp directory and, for each station, first check if it clashes with a station already present in the moOde database; if not, extract the station entry to the database and the corresponding files to their proper places.
These are just utility scripts (but I suppose they could be combined into one). I'm not tackling any kind of automated player-to-player transfer or any integration with the moOde UI. The user has to run the export script, transfer the tarball, run the import script, all from the command line. Further these scripts are all or none; I'm not tackling any kind of user selection of the stations to export or import.

I starting developing these scripts for my own use but they may be useful to others to:
  • Deal with upgrading to a new major release of moOde
  • Copy stations from one player to another player whether it's running the same release or a different release
  • Share favorites to another user
I'll have to spend some time reading Tim's release notes to see how far back in moOde releases these scripts will work. IIRC, radio logo thumbnails were introduced mid 4.x. Don't recall if the database schema for radio stations or the location of the file directories has changed since 4.0.

Regards,
Kent
Reply


Messages In This Thread
Radio Stations and Images sync - by Im bored - 08-06-2019, 12:02 AM
RE: Radio Stations and Images sync - by Im bored - 08-08-2019, 10:25 PM
RE: Radio Stations and Images sync - by Im bored - 08-10-2019, 08:08 PM
RE: Radio Stations and Images sync - by ghoeher - 08-10-2019, 09:49 AM
RE: Radio Stations and Images sync - by TheOldPresbyope - 08-10-2019, 01:07 PM
RE: Radio Stations and Images sync - by ghoeher - 08-10-2019, 02:08 PM
RE: Radio Stations and Images sync - by ghoeher - 08-11-2019, 05:28 AM
RE: Radio Stations and Images sync - by Im bored - 08-21-2019, 06:58 PM
RE: Radio Stations and Images sync - by Im bored - 08-21-2019, 08:13 PM
RE: Radio Stations and Images sync - by Im bored - 08-21-2019, 08:24 PM
RE: Radio Stations and Images sync - by Gekel - 05-26-2021, 08:10 AM
RE: Radio Stations and Images sync - by bitlab - 05-26-2021, 08:50 PM

Forum Jump: