def convert_old_settings(): old_settings = ConfigParser() old_settings.read(str(util.get_data_dir() / "settings.ini")) cemu_dir = old_settings["Settings"]["cemu_dir"] mlc_dir = old_settings["Settings"]["mlc_dir"] game_dir = old_settings["Settings"]["game_dir"] update_dir = util.guess_update_dir(Path(mlc_dir), Path(game_dir)) dlc_dir = util.guess_aoc_dir(Path(mlc_dir), Path(game_dir)) settings = { "cemu_dir": cemu_dir, "game_dir": game_dir, "game_dir_nx": "", "load_reverse": old_settings["Settings"]["load_reverse"] == "True", "update_dir": str(update_dir or ""), "dlc_dir": str(dlc_dir or ""), "dlc_dir_nx": "", "store_dir": str(util.get_data_dir()), "site_meta": old_settings["Settings"]["site_meta"], "no_guess": old_settings["Settings"]["guess_merge"] == "False", "lang": old_settings["Settings"]["lang"], "no_cemu": False, "wiiu": True, } setattr(util.get_settings, "settings", settings) (util.get_data_dir() / "settings.ini").unlink() util.save_settings()
def save_settings(self, params): print("Saving settings, BCML will reload momentarily...") if util.get_settings("wiiu") != params["settings"]["wiiu"]: util.clear_all_caches() if hasattr(self, "gb_api"): self.gb_api.reset_update_time(params["settings"]["wiiu"]) del self.gb_api self.gb_api = GameBananaDb() util.get_settings.settings = params["settings"] util.save_settings()
def get_ver(self, params=None): updated = util.get_settings("last_version") < VERSION res = { "version": USER_VERSION, "update": (util.get_latest_bcml() > VERSION and not util.get_settings("suppress_update")), "showChangelog": updated and util.get_settings("changelog"), } if updated: util.get_settings()["last_version"] = VERSION util.save_settings() return res
def save_settings(self, params): print("Saving settings, BCML will reload momentarily...") util.get_settings.settings = params["settings"] util.save_settings()
def save_settings(self, params): print("Saving settings, BCML will reload momentarily...") if util.get_settings("wiiu") != params["settings"]["wiiu"]: util.clear_all_caches() util.get_settings.settings = params["settings"] util.save_settings()