From f760e7f0fadceb03754d44c5cd45f488ee21fb6b Mon Sep 17 00:00:00 2001 From: Wang Zhiyu Date: Sat, 9 Aug 2025 08:41:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BC=93=E5=AD=98=E5=AE=9E=E7=94=A8?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compositions.py | 3 ++- precaching.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compositions.py b/compositions.py index 8507bf7..6ba58de 100644 --- a/compositions.py +++ b/compositions.py @@ -188,6 +188,7 @@ class FillBlank(Composition): yield Button("退格", id=self.regid(f"delete")) def handler(self, event, type_): + # TODO: 改动:在线错误纠正 if type_ == "button": if self.recid(event.button.id) == "delete": if len(self.inputlist) > 0: @@ -293,4 +294,4 @@ class AppLauncher(App): if __name__ == "__main__": app = AppLauncher() - app.run() \ No newline at end of file + app.run() diff --git a/precaching.py b/precaching.py index 921da5f..cca1b7e 100644 --- a/precaching.py +++ b/precaching.py @@ -21,8 +21,8 @@ def proc_file(path: Path): c = 0 for i in nu.nucleons: c += 1 - print(f"预缓存 [{nu.name}] ({c}/{len(nu)}): {i['content']}") - precache(i['content']) + print(f"预缓存 [{nu.name}] ({c}/{len(nu)}): {i['content'].replace('/', '')}") + precache(i['content'].replace('/', '')) def walk(path_str: str): @@ -49,4 +49,4 @@ if __name__ == "__main__": walk("./nucleon") elif choice == "C": shutil.rmtree("./cache/voice", ignore_errors=True) - print("缓存已清空") \ No newline at end of file + print("缓存已清空")