fix(anime): batch mode sub_only→auto (영상+자막), timeout 60→120초

This commit is contained in:
2026-03-19 06:58:46 +09:00
parent 9693ba0845
commit 595c6ee676
2 changed files with 4 additions and 10 deletions

View File

@@ -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 파싱

View File

@@ -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")