fix(anime): 전수 감사 — action 분기 완성 + 중복 코드 제거
- sub_only: title O → download(sub_only), title X → batch_download(sub_only) - video_only: pipeline.download(video_only) 분기 추가 - schedule: list/scan과 통합 (NAS 현황 조회) - 존재하지 않는 sync_subtitles → batch_download(sub_only)로 교체 - 중복 list/scan 코드 블록 제거
This commit is contained in:
@@ -32,7 +32,7 @@ async def handle_anime_message(
|
||||
|
||||
async with message.channel.typing():
|
||||
try:
|
||||
if action in ("list", "scan"):
|
||||
if action in ("list", "scan", "schedule"):
|
||||
# NAS 현황 조회
|
||||
from tools.nas_scanner import NasScanner
|
||||
scanner = NasScanner()
|
||||
@@ -91,6 +91,19 @@ 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 == "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:
|
||||
# 영상만 다운로드
|
||||
episode = parsed.get("episode")
|
||||
result = await pipeline.download(title, mode="video_only", episode=episode)
|
||||
|
||||
elif action == "status":
|
||||
status = await pipeline.get_status()
|
||||
if not status:
|
||||
|
||||
Reference in New Issue
Block a user