![]() |
[How to do instruction] Exporting/Importing Radio Stations - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Exporting/Importing Radio Stations (/showthread.php?tid=3522) |
RE: Exporting/Importing Radio Stations - janvda - 04-11-2021 (04-10-2021, 03:49 PM)fdealexa Wrote: Hello Jan, Hi Francesco, please find my stations.zip attached to this post. If needed, I still have my 6.7.1 version available on another microSD, so I can re-create the file. Thx for your help! [attachment=2242] @bitlab sorry for not giving credit to the correct person for creating the script, so a big thank you! offcourse I already tried rebooting several times, and clearing browser cache, tried different browsers, but that doesn't seem to help. RE: Exporting/Importing Radio Stations - fdealexa - 04-11-2021 (04-11-2021, 10:38 AM)janvda Wrote:(04-10-2021, 03:49 PM)fdealexa Wrote: Hello Jan, Hi Jan, Found a problem on the .csv file in the line "Nostalgie 60-70". I am trying to repair it and I will send it to you. Regards, Francesco RE: Exporting/Importing Radio Stations - fdealexa - 04-12-2021 (04-11-2021, 09:47 PM)fdealexa Wrote:(04-11-2021, 10:38 AM)janvda Wrote:(04-10-2021, 03:49 PM)fdealexa Wrote: Hello Jan, Hello Jan, Please be informed that the import process of the "stationmanager" program is complete when the final message of the total number of stations imported is displayed. About the error in the .csv file: there is a duplicated record for the "Nostalgie 60-70", one of which with a slash (/) instead of the dash (-) and without the field delimiters ("). In the afternoon I will send to you the correct .zip file. Regards, Francesco RE: Exporting/Importing Radio Stations - fdealexa - 04-12-2021 Hi Jan, as mentioned before, please find attached the .zip files corrected. the total stations imported are 33. for the second I assume you are using moOde7.1. Of course they are alternative: stationsGood.zip: it is your original format (from 6.7.1) to be used with the program stationmanager: the application will decode the information and will create the related files on the system. stationsNew.zip: it is the save after the import phase. ready to use with the program: it contains all the files. May I suggest that after a import process you do:
I hope you will import them succesfully and will be happy about it. Regards, Francesco [attachment=2247] [attachment=2248] P.S.: Please let me know if everything is ok RE: Exporting/Importing Radio Stations - bitlab - 04-12-2021 (04-10-2021, 08:02 PM)TheOldPresbyope Wrote: @janvda @TheOldPresbyope in my opinion you are downplaying your role with the creation of the script haha. You did provide a lot of the 'BI' rules behind the script and also did a big part of the testing. RE: Exporting/Importing Radio Stations - bitlab - 04-12-2021 @fdealexa great catch! Let see if we can protect against this case on both export and import, or at least continue when this happens. RE: Exporting/Importing Radio Stations - fdealexa - 04-12-2021 @bitlab Dear "bitlab", thanks, too good. I think that the creation of the .csv (in the stationmanager) or the .json (in the moOde UI) is the most critical point in the process of mass import of stations. My experience (more than 700 user stations) led me to design an Excel sheet for the creation of these files. The ideal would be to use only the set of .pls files (URL and name) and .jpg (only the high resolution: those with the lowest resolutions are already created in the program), if there is no specific need to fill in the additional fields. In this regard, I tried to ask Tim, in the SORTING AND GROUPING functionality, the possibility of having one of the "spare fields" as "Sort tag": what do you think? For the export process, however, theoretically, if the import is controlled (as it is) there should be no inconsistencies in the databases. As for the improvement perhaps I would add a message of "no radio station imported" at the end of the script, similar to the "XX radio imported". that's all. Greetings and thanks again for asking me (and sorry for my english), Francesco RE: Exporting/Importing Radio Stations - janvda - 04-14-2021 (04-12-2021, 02:52 PM)fdealexa Wrote: Please let me know if everything is ok Thx for your help, great job! RE: Exporting/Importing Radio Stations - bitlab - 04-14-2021 @janvda @fdealexa To prevent such situations in the future I updated the stationmanager.py script to instead of abort continue with the next import station. I guess it will be part of moOde 7.2. @fdealexa By the way the stations backupzip which contains a .csv aren't created with the stationmanager.py script, but with older moOde stations backup script. The new backup will always contains the .json file. This is the only way to support the rich information Tim added to the about the station to the database. When running the import from the web interface you don't see all the output of the stationmanager. When you run it from command line it will report the import status and errors and. With the fixed script the error in this case will showup as an 'Error on import': Code: sudo ./stationmanager.py --import --scope all --how clear ~/stations_problem.zip RE: Exporting/Importing Radio Stations - bitlab - 04-14-2021 Importing and exporting personal stations: From the command line it is also possible to merge (as opposed to flush everything) multiple backups (for the scope other) into moOde. For example I have a few custom stations from which I have a backup. After a fresh install I only restore those in without deleting the already present one. In this was I get the latest&greates default radio radio stations from moOde, while I keep my personal stations. You can create the backup from the web interface or command line with: Code: sudo /var/www/command/stationmanager.py --export --scope other ~/stations_mycustom.zip Because the import on the web interface clears all stations and import all station , we need todo the restore in this case from commandline. Restoring of the personal stations with a merge (it doesn't matter if the backup also contains the system station due to --scope other argument): Code: sudo /var/www/command/stationmanager.py --import --scope other --how merge ~/stations_mycustom.zip |