From 79470fd13e8b4788b96ec2ea84d19d563d088a11 Mon Sep 17 00:00:00 2001 From: Sander Land <48946947+sanderland@users.noreply.github.com> Date: Thu, 28 Jan 2021 03:18:37 +0900 Subject: [PATCH] 1.7.4 (#341) * download models * print --- katrain/core/constants.py | 2 +- katrain/gui/popups.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/katrain/core/constants.py b/katrain/core/constants.py index bd32d0c..a9f7b07 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -1,5 +1,5 @@ PROGRAM_NAME = "KaTrain" -VERSION = "1.7.3" +VERSION = "1.7.4" HOMEPAGE = "https://github.com/sanderland/katrain" CONFIG_MIN_VERSION = "1.7.0" # keep config files from this version ANALYSIS_FORMAT_VERSION = "1.0" diff --git a/katrain/gui/popups.py b/katrain/gui/popups.py index a1c700d..acb0144 100644 --- a/katrain/gui/popups.py +++ b/katrain/gui/popups.py @@ -465,6 +465,7 @@ class BaseConfigPopup(QuickConfigGui): super().__init__(katrain) self.paths = [self.katrain.config("engine/model"), "katrain/models", DATA_FOLDER] self.katago_paths = [self.katrain.config("engine/katago"), DATA_FOLDER] + self.last_clicked_download_models = 0 def check_models(self, *args): all_models = [self.MODELS, self.MODEL_DESC, self.katrain.config("dist_models", {})] @@ -501,6 +502,7 @@ class BaseConfigPopup(QuickConfigGui): f.replace("/", os.path.sep).replace(PATHS["PACKAGE"], "katrain") for ftype in ["*.bin.gz", "*.txt.gz"] for f in glob.glob(slashpath + "/" + ftype) + if '.tmp.' not in f ] if files and path not in self.paths: self.paths.append(path) # persistent on paths with models found @@ -593,7 +595,6 @@ class BaseConfigPopup(QuickConfigGui): dist_models[name] = json.loads(response.data.decode("utf-8"))["model_file"] except Exception as e: self.katrain.log(f"Failed to retrieve info for model: {e}", OUTPUT_INFO) - self.katrain._config["dist_models"] = dist_models self.katrain.save_config(key="dist_models")