From 28ae0d58534c4a72a99a4201f2e28fa1a7ca6577 Mon Sep 17 00:00:00 2001 From: Variet Agent Date: Wed, 18 Mar 2026 21:44:01 +0900 Subject: [PATCH] =?UTF-8?q?fix(anime):=20download=20+=20title=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=20batch=5Fdownload=EB=A1=9C=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - action=download, title='' → filter에 sub 포함시 sub_only, 아니면 auto - video_only도 title 없을 때 batch 처리 추가 --- handlers/anime_handler.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/handlers/anime_handler.py b/handlers/anime_handler.py index 108e60f..16fe4fa 100644 --- a/handlers/anime_handler.py +++ b/handlers/anime_handler.py @@ -91,19 +91,27 @@ async def handle_anime_message( mode = parsed.get("download_mode", "auto") episode = parsed.get("episode") result = await pipeline.download(title, mode=mode, episode=episode) + 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 == "sub_only": # 자막만 다운로드 episode = parsed.get("episode") if title: result = await pipeline.download(title, mode="sub_only", episode=episode) else: - # 전체 자막 최신화 result = await pipeline.batch_download(mode="sub_only") - elif action == "video_only" and title: + elif action == "video_only": # 영상만 다운로드 episode = parsed.get("episode") - result = await pipeline.download(title, mode="video_only", episode=episode) - + if title: + result = await pipeline.download(title, mode="video_only", episode=episode) + else: + result = await pipeline.batch_download(mode="video_only") elif action == "status": status = await pipeline.get_status() if not status: