diff --git a/gradience/main.py b/gradience/main.py index 6b2b8cc6f..2d6abc387 100644 --- a/gradience/main.py +++ b/gradience/main.py @@ -190,6 +190,9 @@ def reload_user_defined_presets(self): buglog("file") # keep compatiblity with old presets if repo.name.endswith(".json"): + if not os.path.isdir(os.path.join(PRESET_DIR, "user")): + os.mkdir(os.path.join(PRESET_DIR, "user")) + os.rename(repo, os.path.join( PRESET_DIR, "user", repo.name)) diff --git a/gradience/presets_manager_window.py b/gradience/presets_manager_window.py index 99b7d39ef..9816232cc 100644 --- a/gradience/presets_manager_window.py +++ b/gradience/presets_manager_window.py @@ -62,12 +62,8 @@ class GradiencePresetWindow(Adw.Window): custom_presets = {} official_repositories = { - _( - "Official" - ): "https://github.com/GradienceTeam/Community/raw/next/official.json", - _( - "Curated" - ): "https://github.com/GradienceTeam/Community/raw/next/curated.json", + "Official": "https://github.com/GradienceTeam/Community/raw/next/official.json", + "Curated": "https://github.com/GradienceTeam/Community/raw/next/curated.json", } search_results_list = [] @@ -343,6 +339,9 @@ def reload_pref_group(self): buglog("file") # keep compatiblity with old presets if repo.name.endswith(".json"): + if not os.path.isdir(os.path.join(preset_directory, "user")): + os.mkdir(os.path.join(preset_directory, "user")) + os.rename(repo, os.path.join( preset_directory, "user", repo.name))