From 595c6ee676812236eefcfe8aaba9fd318034318a Mon Sep 17 00:00:00 2001 From: Variet Agent Date: Thu, 19 Mar 2026 06:58:46 +0900 Subject: [PATCH] =?UTF-8?q?fix(anime):=20batch=20mode=20sub=5Fonly?= =?UTF-8?q?=E2=86=92auto=20(=EC=98=81=EC=83=81+=EC=9E=90=EB=A7=89),=20time?= =?UTF-8?q?out=2060=E2=86=92120=EC=B4=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/discord_bot.py | 2 +- handlers/anime_handler.py | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/api/discord_bot.py b/api/discord_bot.py index 6bbc535..23052a3 100644 --- a/api/discord_bot.py +++ b/api/discord_bot.py @@ -385,7 +385,7 @@ async def on_message(message: discord.Message): history = await _get_channel_history(message.channel, limit=10) classify_input = f"{history}## User Message\n{user_text}" logger.info(f"[분류] 입력: {user_text[:80]}") - raw = await gemini.call("unified", classify_input, timeout=60) + raw = await gemini.call("unified", classify_input, timeout=120) logger.info(f"[분류] Gemini 출력 ({len(raw)}자): {raw[:200]}") # JSON 파싱 diff --git a/handlers/anime_handler.py b/handlers/anime_handler.py index 455cfae..29bcb59 100644 --- a/handlers/anime_handler.py +++ b/handlers/anime_handler.py @@ -94,16 +94,10 @@ async def handle_anime_message( # resolve 실패 시 batch fallback (title이 애니 제목이 아닌 경우) if not result.success and not episode: logger.info(f"단건 resolve 실패 → 배치 fallback: '{title}'") - dl_filter = parsed.get("filter", "") - batch_mode = "sub_only" if "sub" in dl_filter else "auto" - result = await pipeline.batch_download(mode=batch_mode) - elif action == "download" and not title: - # 이번 분기 전체 다운로드 (자막 최신화 등) - dl_filter = parsed.get("filter", "") - if "sub" in dl_filter: - result = await pipeline.batch_download(mode="sub_only") - else: result = await pipeline.batch_download(mode="auto") + elif action == "download" and not title: + # 이번 분기 전체 다운로드 — filter에 sub은 "자막 포함"이지 "자막만"이 아님 + result = await pipeline.batch_download(mode="auto") elif action == "sub_only": # 자막만 다운로드 episode = parsed.get("episode")