fix(anime): 파이프라인 5건 수정 — 에피소드 정규식(v2/S01E), 릴리스 그룹 필터, 자막 보호, 배치 다운로드, 타임아웃
This commit is contained in:
@@ -150,3 +150,44 @@ class NasScanner:
|
||||
"total_size_gb": round(sum(f.total_size_gb for f in folders), 2),
|
||||
"folders": folders,
|
||||
}
|
||||
|
||||
|
||||
# ── CLI 진입점 ──
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
import json
|
||||
|
||||
scanner = NasScanner()
|
||||
args = sys.argv[1:]
|
||||
|
||||
if not args or args[0] == "scan":
|
||||
# python tools/nas_scanner.py scan [--year 26] [--quarter 1]
|
||||
year = quarter = None
|
||||
for i, a in enumerate(args):
|
||||
if a == "--year" and i + 1 < len(args):
|
||||
year = int(args[i + 1])
|
||||
if a == "--quarter" and i + 1 < len(args):
|
||||
quarter = int(args[i + 1])
|
||||
|
||||
folders = scanner.list_anime_folders(year=year, quarter=quarter)
|
||||
for f in folders:
|
||||
print(f"📁 {f.folder_name} | 영상 {f.video_count}개 | 자막 {f.subtitle_count}개 | {f.total_size_gb:.1f}GB")
|
||||
print(f"\n총 {len(folders)}개 애니, 영상 {sum(f.video_count for f in folders)}개")
|
||||
|
||||
elif args[0] == "search" and len(args) > 1:
|
||||
# python tools/nas_scanner.py search "프리렌"
|
||||
keyword = " ".join(args[1:])
|
||||
results = scanner.search(keyword)
|
||||
for f in results:
|
||||
print(f"📁 {f.folder_name} | 영상 {f.video_count}개 | 자막 {f.subtitle_count}개")
|
||||
if not results:
|
||||
print(f"'{keyword}' 검색 결과 없음")
|
||||
|
||||
elif args[0] == "summary":
|
||||
# python tools/nas_scanner.py summary
|
||||
summary = scanner.get_summary()
|
||||
print(json.dumps(summary, ensure_ascii=False, indent=2, default=str))
|
||||
|
||||
else:
|
||||
print("사용법: python tools/nas_scanner.py [scan|search|summary] [옵션]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user