From 80b861ab46df9d28bb191e7ecb0a2006df1a04c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:55:35 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/textsource/filetrans.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LunaTranslator/LunaTranslator/textsource/filetrans.py b/LunaTranslator/LunaTranslator/textsource/filetrans.py index aa885bf3..8c2118ed 100644 --- a/LunaTranslator/LunaTranslator/textsource/filetrans.py +++ b/LunaTranslator/LunaTranslator/textsource/filetrans.py @@ -168,11 +168,13 @@ class filetrans(basetext): return time.sleep(0.1) + lenfile = len(file) + class __p: def __del__(self): gobject.baseobject.settin_ui.progresssignal2.emit( "{}/{} {:0.2f}% ".format( - index + 1, len(file), 100 * (index + 1) / len(file) + index + 1, lenfile, 100 * (index + 1) / lenfile ), (index + 1), )