55 lines
2.0 KiB
Bash
55 lines
2.0 KiB
Bash
#!/bin/bash
|
|
# Git commit script for webhook path resolution fixes
|
|
|
|
echo "🔧 Adding files to git..."
|
|
git add nfoguard.py
|
|
git add SUMMARY.md
|
|
git add VERSION
|
|
git add debug_webhook_isolation.py
|
|
git add .env.fixed
|
|
|
|
echo "📝 Committing changes..."
|
|
git commit -m "fix: resolve Radarr webhook path variable bug and enhance validation
|
|
|
|
## Critical Bug Fix
|
|
- Fixed 'container_path' undefined variable error in Radarr webhook handler
|
|
- Webhook now properly handles both 'folderPath' and 'path' fields
|
|
- Added mandatory path validation before processing
|
|
|
|
## Enhanced Webhook Validation
|
|
- Verify mapped paths exist before batch processing
|
|
- Add IMDb ID validation in batch processor to prevent wrong movie processing
|
|
- Improved error logging with specific failure reasons
|
|
|
|
## Path Mapping Improvements
|
|
- Support both folderPath (new Radarr format) and path (legacy) fields
|
|
- Early rejection of webhooks with invalid path mappings
|
|
- Better error messages for debugging path issues
|
|
|
|
## Version & Documentation Updates
|
|
- Bump version to v1.3.1 with comprehensive changelog
|
|
- Updated SUMMARY.md with detailed webhook isolation analysis
|
|
- Added debug script for testing webhook processing
|
|
|
|
## Fixes Issue
|
|
The webhook was failing with 'cannot access local variable container_path'
|
|
because folderPath wasn't being handled, causing the validation block to
|
|
reference an undefined variable.
|
|
|
|
## Test Results
|
|
✅ Webhook accepts valid paths and processes correct movies
|
|
✅ Webhook rejects invalid paths early to prevent wrong processing
|
|
✅ Batch validation ensures IMDb ID matches path before processing
|
|
✅ No more Annabelle → Harry Potter cross-processing bugs"
|
|
|
|
echo "✅ Commit completed!"
|
|
echo ""
|
|
echo "📋 Files committed:"
|
|
echo " • nfoguard.py (webhook path bug fix + validation)"
|
|
echo " • SUMMARY.md (comprehensive analysis + v1.3.1 details)"
|
|
echo " • VERSION (bumped to 1.3.1)"
|
|
echo " • debug_webhook_isolation.py (testing tool)"
|
|
echo " • .env.fixed (corrected configuration template)"
|
|
echo ""
|
|
echo "🚀 Ready to push! Run:"
|
|
echo " git push origin main" |