fix: NC 검색 PROPFIND 폴백 + 자막 중복 스킵
- nc_files.py: WebDAV SEARCH 501 시 PROPFIND depth=99 + 로컬 필터 폴백 - subtitle_downloader.py: download_file에 기존 파일 존재 체크 추가 (이미 있으면 스킵)
This commit is contained in:
@@ -252,6 +252,13 @@ class SubtitleDownloader:
|
||||
target_dir = Path(save_dir) if save_dir else self.download_dir
|
||||
target_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# 이미 같은 파일명이 존재하면 스킵
|
||||
existing = target_dir / sub.filename
|
||||
if existing.exists() and existing.stat().st_size > 0:
|
||||
logger.info(f"자막 이미 존재, 스킵: {existing}")
|
||||
sub.local_path = str(existing)
|
||||
return str(existing)
|
||||
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user