From e5975f0772d4d149d28ca6b10e6b24d30e3525ab Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 29 Jun 2023 19:13:06 +0100 Subject: [PATCH] fixes bug where old configs may not have new keys patch bump --- pyproject.toml | 2 +- vmcompact/configurations.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d944094..1c37772 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "voicemeeter-compact" -version = "1.8.0" +version = "1.8.1" description = "A Compact Voicemeeter Remote App" authors = ["onyx-and-iris "] license = "MIT" diff --git a/vmcompact/configurations.py b/vmcompact/configurations.py index a3dcc09..6d9cc6b 100644 --- a/vmcompact/configurations.py +++ b/vmcompact/configurations.py @@ -59,8 +59,13 @@ _defaults = { "navigation": {"show": True}, } + if "app" in configuration: - configuration["app"] = _defaults | configuration["app"] + for key in _defaults: + if key in configuration["app"]: + configuration["app"][key] = _defaults[key] | configuration["app"][key] + else: + configuration["app"][key] = _defaults[key] else: configuration["app"] = _defaults