From 4c3b80fc5a1b62118c6ccf4460ff5035eb9f422e Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Tue, 15 Jul 2025 01:52:07 +0300 Subject: [PATCH] do not update alias check progress on each iteration --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8ed2b8b..81b2c5f 100644 --- a/main.py +++ b/main.py @@ -311,11 +311,13 @@ async def check_aliases(msg: Message): await resp.edit_text(f'Checking aliases {progress}/{len(tags)}\n\n{l}', parse_mode=ParseMode.HTML) for sub in tags: + replaced_tags = False for subtag in sub.split(): if replacements := await e621.get_tag_aliases(subtag): lines.append(f'- {subtag} -> {replacements[0]}, ({sub})') + replaced_tags = False progress += 1 - if progress % 20 == 0: + if replaced_tags: await send_progress() await send_progress()