diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 12:17:21 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 12:17:21 -0400 |
| commit | 5c3cd5d0dc620a64b13475c7daa5638ddcb061bb (patch) | |
| tree | e2620ca3fcd3c3f39217b0c32834c3aa2fc6ba89 /py_modules/lsfg_vk/config_schema.py | |
| parent | 4104e28053fc03b3875958c7bf56ec6fbc5aab84 (diff) | |
| download | decky-lsfg-vk-5c3cd5d0dc620a64b13475c7daa5638ddcb061bb.tar.gz decky-lsfg-vk-5c3cd5d0dc620a64b13475c7daa5638ddcb061bb.zip | |
fix unique prof creation in conf
Diffstat (limited to 'py_modules/lsfg_vk/config_schema.py')
| -rw-r--r-- | py_modules/lsfg_vk/config_schema.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/py_modules/lsfg_vk/config_schema.py b/py_modules/lsfg_vk/config_schema.py index 60e54e0..8027bc1 100644 --- a/py_modules/lsfg_vk/config_schema.py +++ b/py_modules/lsfg_vk/config_schema.py @@ -213,7 +213,11 @@ class ConfigurationManager: lines.append("") # Add game sections for each profile - for profile_name, config in profile_data["profiles"].items(): + # Sort profiles to ensure consistent order (default profile first) + sorted_profiles = sorted(profile_data["profiles"].items(), + key=lambda x: (x[0] != DEFAULT_PROFILE_NAME, x[0])) + + for profile_name, config in sorted_profiles: lines.append("[[game]]") if profile_name == DEFAULT_PROFILE_NAME: lines.append("# Plugin-managed game entry (default profile)") @@ -228,7 +232,7 @@ class ConfigurationManager: if field_name in GLOBAL_SECTION_FIELDS: continue - value = config[field_name] + value = config.get(field_name, field_def.default) # Add field description comment lines.append(f"# {field_def.description}") |
