fix(anime): download + title 없을 때 batch_download로 처리

- action=download, title='' → filter에 sub 포함시 sub_only, 아니면 auto
- video_only도 title 없을 때 batch 처리 추가
This commit is contained in:
2026-03-18 21:44:01 +09:00
parent dc1bc8f46b
commit 28ae0d5853

View File

@@ -91,19 +91,27 @@ async def handle_anime_message(
mode = parsed.get("download_mode", "auto") mode = parsed.get("download_mode", "auto")
episode = parsed.get("episode") episode = parsed.get("episode")
result = await pipeline.download(title, mode=mode, episode=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": elif action == "sub_only":
# 자막만 다운로드 # 자막만 다운로드
episode = parsed.get("episode") episode = parsed.get("episode")
if title: if title:
result = await pipeline.download(title, mode="sub_only", episode=episode) result = await pipeline.download(title, mode="sub_only", episode=episode)
else: else:
# 전체 자막 최신화
result = await pipeline.batch_download(mode="sub_only") result = await pipeline.batch_download(mode="sub_only")
elif action == "video_only" and title: elif action == "video_only":
# 영상만 다운로드 # 영상만 다운로드
episode = parsed.get("episode") 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": elif action == "status":
status = await pipeline.get_status() status = await pipeline.get_status()
if not status: if not status: