fix: isolate movie and TV webhook processing to prevent cross-contamination

- Add prefixed batch keys (movie:imdbid, tv:imdbid) to prevent IMDb ID collisions
- Add path existence validation for Radarr webhooks to reject invalid mappings early
- Remove duplicate Radarr webhook handler code
- Add debug scripts for troubleshooting webhook and path mapping issues
- Create corrected .env template with fixed TV_PATHS and SONARR_ROOT_FOLDERS

This fixes the issue where TV path mapping failures caused movie webhooks
to process wrong movies due to shared batch queue corruption.
This commit is contained in:
2025-09-14 12:43:07 -04:00
parent 91881262ce
commit e741e4b046
7 changed files with 384 additions and 43 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# Git commit script for webhook isolation fixes
echo "🔧 Adding files to git..."
git add nfoguard.py
git add debug_webhook_issue.py
git add debug_path_mapping.py
git add .env.fixed
echo "📝 Committing changes..."
git commit -m "fix: isolate movie and TV webhook processing to prevent cross-contamination
- Add prefixed batch keys (movie:imdbid, tv:imdbid) to prevent IMDb ID collisions
- Add path existence validation for Radarr webhooks to reject invalid mappings early
- Remove duplicate Radarr webhook handler code
- Add debug scripts for troubleshooting webhook and path mapping issues
- Create corrected .env template with fixed TV_PATHS and SONARR_ROOT_FOLDERS
This fixes the issue where TV path mapping failures caused movie webhooks
to process wrong movies due to shared batch queue corruption.
Closes: webhook processing wrong movies (Annabelle → Harry Potter bug)"
echo "✅ Commit completed!"
echo ""
echo "📋 Summary of changes:"
echo " • Fixed webhook batch queue isolation"
echo " • Added path validation to prevent processing failures"
echo " • Created debugging tools for future troubleshooting"
echo " • Provided corrected .env configuration template"