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: