From 7baffb8cc00818ace885320ad5633f16731e6b4b Mon Sep 17 00:00:00 2001 From: dazedanon Date: Tue, 9 Sep 2025 08:26:44 -0500 Subject: [PATCH] Fix filename in modules --- modules/images.py | 4 +++- modules/rpgmakerplugin.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/images.py b/modules/images.py index 46a9000..1142120 100644 --- a/modules/images.py +++ b/modules/images.py @@ -32,6 +32,7 @@ ESTIMATE = "" TOKENS = [0, 0] NAMESLIST = [] MISMATCH = [] # Lists files that throw a mismatch error (Length of GPT list response is wrong) +FILENAME = None # Open AI load_dotenv() @@ -70,8 +71,9 @@ LEAVE = False def handleImages(folderName, estimate): - global ESTIMATE, TOKENS + global ESTIMATE, TOKENS, FILENAME ESTIMATE = estimate + FILENAME = folderName start = time.time() # Translate Strings diff --git a/modules/rpgmakerplugin.py b/modules/rpgmakerplugin.py index 34186e6..4058f46 100644 --- a/modules/rpgmakerplugin.py +++ b/modules/rpgmakerplugin.py @@ -43,6 +43,7 @@ BRFLAG = False # If the game uses
instead FIXTEXTWRAP = True # Overwrites textwrap IGNORETLTEXT = False # Ignores all translated text. MISMATCH = [] # Lists files that throw a mismatch error (Length of GPT list response is wrong) +FILENAME = None # tqdm Globals BAR_FORMAT = "{l_bar}{bar:10}{r_bar}{bar:-10b}" @@ -74,8 +75,9 @@ TRANSLATION_CONFIG = TranslationConfig( LEAVE = False def handlePlugin(filename, estimate): - global ESTIMATE, PBAR + global ESTIMATE, PBAR, FILENAME ESTIMATE = estimate + FILENAME = filename if ESTIMATE: start = time.time()