Closed TobKra96 closed 3 years ago
Nope, I just left it for compatibility right now.
Instead of copying config.json
:
We can copy config.json.bak
.
Anyways, copying the config will ensure that during reinstallation it won't be touched.
Yes, we have to take care of the compatibility of the new config files. If there is a new effect with new settings, the old config file could cause errors.
Additionally, maybe we can use relative paths? Absolute paths are usually no good ideas. What do you mean?
Yes, and a config backup system would be good.
I would split the Topics:
@Teraskull:
@TobKra96:
What do you think? Have a great day.
I don't think we need a backup, saving the previous config.json as config.json.bak would be enough.
config.json.bak is the config, we are using for the reset. If everything went wrong, he should able to start from scratch. I would not change it. Maybe we can use another name for the user backup. Or save the user backup inside the .mlsc folder?
That's what I meant, create a backup with config.json.bak
in .mlsc
.
Ok, I was not sure. Yes, that would work.
I added a compatibility checker, which checks every config leaf (recursive) if it exists and set the default value if it does not exist. It worked better than I thought. The config will be checked during the start and after an import.
Perfect, no more manual copying of new effects after updating :D
Done Maybe we will find a better folder for the config in the future, but for now, it is done.
Change the path of the config file to "/share/.mlsc"
Do we need the
music_led_strip_control/server/libs/config.json
any more? We can create our config if it is missing from the templatemusic_led_strip_control/server/libs/config.json.bak
.We have to adjust the import and export mechanism inside the webinterface. https://github.com/TobKra96/music_led_strip_control/blob/9e67a3b1e90bb417c7778d1667b08f1c437d23a5/server/libs/webserver.py#L26