Update analysis and plan files to enhance duplicate handling and reporting

- Updated `analysis.json` with a new generation timestamp.
- Modified `plan.json` to include a new plan ID and created timestamp, and changed operation types from "no-op" to "quarantine" for specific files needing manual review.
- Enhanced the README.md to document the new `--analysis` option for generating execution plans, which now includes a human-readable summary and duplicate handling strategies.
- Introduced a new `duplicate_resolve.py` module to manage duplicate file resolution strategies.
- Improved the execution engine to support quarantine operations and added rollback functionality for quarantined files.

These changes improve the functionality of the Video Library Manager by providing better duplicate management and clearer reporting capabilities.
This commit is contained in:
windyboy
2026-02-10 18:07:38 +08:00
parent dcd87754cf
commit 79f5ddf1f5
14 changed files with 882 additions and 456 deletions
+19
View File
@@ -510,6 +510,25 @@ class QuarantineManager:
return entries
def find_quarantine_path_by_original(self, original_path: Path) -> Optional[Path]:
"""Find the quarantine path for a file that was quarantined from original_path.
Used when rolling back a quarantine operation when the rollback log only
has the original (source) path and not the actual quarantine destination.
Args:
original_path: The original path of the file before quarantine
Returns:
The path where the file was moved in quarantine, or None if not found
"""
for category in ("movie", "series"):
manifest = self._load_manifest(category)
for entry in manifest.entries:
if entry.original_path == original_path:
return entry.quarantine_path
return None
def restore_from_quarantine(
self,
quarantine_path: Path