08-22-2020, 05:27 PM
(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 $
Francesco