07-21-2020, 09:43 PM
(07-15-2020, 10:33 PM)swizzle Wrote: Backup / restore is fraught but it’d be interesting to store moode & mpd configuration files on something other than the sd card if available. The tricky part is those files aren’t necessarily compatible (e.g. the library db for mpd might change or the old moode config files might be missing data used by a new moode version. You can work around those kinds of things but it introduces more complexity and that makes life harder and programs more prone to bugs.
I'm only talking about saving and restoring those settings that the user makes from the GUI, not databases or system files. Just download a configuration file. Then upload it and moOde would read that file and making the necessary configuration changes. When I say "configuration file," I mean something that does not exist anywhere on moOde today. I'm talking about a file that would be created for the purpose of backing up and restoring settings. Essentially, it would contain every setting that the user can make from the GUI, from WiFi SSID and password to Timezone to whether the HDMI port is on.
You'd push the "save config" button and a file download to your PC would occur. When you hit "restore config," you'd pick a file and upload it. If you wanted to validate the file, to be relatively sure the user had not tampered with it or selected a file that was not of the correct type, the file could contain an MD5 hash for all of the data beyond the MD5 hash line.
It's no harder to set something by reading it from a backup configuration file than it is to accept user input from the GUI. moOde would obviously need changes to read from a file, but it's not fundamentally more difficult than accepting user input through the GUI.
Here's an example of what the file could look like to cover most of the System Config settings section:
Code:
:System Config:
:General:
Timezone: America/New_York
Host name: moode
Keyboard layout: us
Browser title: moOde Player
:System Modifications:
CPU governor: On-Demand
Kernel architecture: 32-bit
USB auto-mounter: Udisks-glue (Default)
Integrated WiFi adapter: On
Integrated BT adapter: On
HDMI port: On
LED0 (Activity): On
LED1 (Power): On
Wait for eth0 address: On
USB (UAC2) fix: Off
:Local Display:
Local UI display: Off
Mouse cursor: On
Screen blank: 10 Mins
Wake display on play: Off
Brightness: 255
Pixel aspect ratio: Default
Rotate screen: 0 Deg
That's the same stuff that appears on one of the GUI screens right now, minus the buttons to perform actions (like Expand filesystem or Clear browser cache). There more further down, but I didn't want to spend the time entering it when the above gets the idea across.
This has another huge advantage: If some user says that something doesn't work, it would be tremendously useful to say "download your configuration file and post it here so we can see what your settings are." Obviously, they could be paranoid and hide their SSID, password, or other personal/security information if they so desired.
Cheers,
Miss Sissy Princess
Miss Sissy Princess