#!/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"