import shutil
from pathlib import Path

archive_dir = Path("04_Assets/archive/duplicate_false_positives")
archive_dir.mkdir(parents=True, exist_ok=True)

# Move shot09 to shot24 to archive
for i in range(9, 25):
    shot_id = f"ep01_scene05_shot{i:02d}"
    video_path = Path(f"04_Assets/videos/{shot_id}_10s_v1.mp4")
    if video_path.exists():
        dest = archive_dir / video_path.name
        shutil.move(str(video_path), str(dest))
        print(f"Moved {video_path.name} -> {dest}")
        
    kf_dir = Path(f"04_Assets/keyframes/{shot_id}")
    if kf_dir.exists():
        kf_dest = archive_dir / f"kf_{shot_id}"
        if kf_dest.exists():
            shutil.rmtree(str(kf_dest))
        shutil.move(str(kf_dir), str(kf_dest))
        print(f"Moved keyframe {kf_dir} -> {kf_dest}")

print("Cleaned up duplicate false-positive files successfully.")
