fix(subtitle): 자막 중복 다운로드 근본 수정 — ZIP 해제 존재체크 + discovered_ep=None 시 전체 스킵

This commit is contained in:
2026-03-19 08:01:22 +09:00
parent a893593f25
commit 190d2ee2a3
2 changed files with 10 additions and 0 deletions

View File

@@ -324,6 +324,11 @@ class SubtitleDownloader:
# 중첩 폴더 무시, 파일만 추출
out_name = Path(name).name
out_path = target_dir / out_name
# 이미 존재하면 스킵 (중복 다운로드 방지)
if out_path.exists() and out_path.stat().st_size > 0:
logger.info(f"ZIP 내 파일 이미 존재, 스킵: {out_name}")
extracted.append(str(out_path))
continue
with zf.open(name) as src, open(out_path, "wb") as dst:
dst.write(src.read())
extracted.append(str(out_path))