diff --git a/ta_symlink.py b/ta_symlink.py index b8b5ce4..2a51fa4 100644 --- a/ta_symlink.py +++ b/ta_symlink.py @@ -1241,7 +1241,15 @@ def api_recovery_delete_batch(): if not source_path or not source_path.exists(): log(f" [DESTRUCT] Final fallback: recursive search for ID {vid_id or 'unknown'}") if vid_id: + video_extensions = {".mp4", ".mkv", ".webm", ".avi", ".mov"} + # Search SOURCE_DIR but skip 'tcconf' and only match video files for candidate in SOURCE_DIR.rglob(f"*{vid_id}*"): + # Safety check: Skip tcconf directory and non-video extensions + if "tcconf" in candidate.parts: + continue + if candidate.suffix.lower() not in video_extensions: + continue + if candidate.is_file(): source_path = candidate log(f" [DESTRUCT] Search found match: {source_path}")