Blackboxai/avi cache scan#1
Conversation
…sion, improve exception handling and reports
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 568dd54e69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| except subprocess.TimeoutExpired: | ||
| return ConversionResult( |
There was a problem hiding this comment.
Remove partial outputs after FFmpeg timeouts
When ffmpeg_timeout_seconds is configured and FFmpeg has already created output_path, this timeout path returns without deleting the partial MP4. The retry loop then calls convert() again, and the existing-file check at the top treats any existing output as a successful skip; with the default remove_source=True, that can mark a timed-out conversion successful and delete the original AVI while leaving a truncated MP4.
Useful? React with 👍 / 👎.
| if directory in dirs_to_scan or len(dirs_to_scan) == 1: | ||
| scan_roots = [directory] |
There was a problem hiding this comment.
Scan the singleton cached subdirectory instead of the root
When the cache reports exactly one new or modified subdirectory, len(dirs_to_scan) == 1 makes this fall back to scan_roots = [directory], so a common incremental case still performs a full rglob over the entire UNC tree. DirectoryCache.get_directories_to_scan() already uses {root_dir} to request a full scan and can return a singleton {subdir} for one changed folder, so the extra length check defeats the intended cache optimization.
Useful? React with 👍 / 👎.
New cache scan