Fix Radarr rename event handling - add missing event type filtering
- Add event type filtering to Radarr webhook handler (Download, Upgrade, Rename) - Ensures consistency with Sonarr webhook processing - Fixes issue where Radarr rename events weren't properly updating NFO files - Bump version to v1.5.3 - Update SUMMARY.md with complete webhook workflow documentation
This commit is contained in:
+66
-2
@@ -1,8 +1,14 @@
|
|||||||
# NFOGuard Development Summary
|
# NFOGuard Development Summary
|
||||||
|
|
||||||
## Current Status: v1.5.2 - TVDB Warning Suppression! 🔇
|
## Current Status: v1.5.3 - Radarr Rename Event Fix! 🔧
|
||||||
|
|
||||||
### Latest Updates (v1.5.2)
|
### Latest Updates (v1.5.3) - September 15, 2025
|
||||||
|
- **🔧 RADARR RENAME FIX**: Added missing event type filtering to Radarr webhooks
|
||||||
|
- **✅ CONSISTENCY**: Radarr now matches Sonarr's event handling (Download, Upgrade, Rename)
|
||||||
|
- **🎯 FIXED ISSUE**: Radarr rename events now properly trigger NFO updates with correct dates
|
||||||
|
- **🔄 WORKFLOW**: Both Sonarr and Radarr now follow identical webhook processing flows
|
||||||
|
|
||||||
|
### Previous Updates (v1.5.2)
|
||||||
- **🔇 TVDB WARNINGS**: Added SUPPRESS_TVDB_WARNINGS configuration option
|
- **🔇 TVDB WARNINGS**: Added SUPPRESS_TVDB_WARNINGS configuration option
|
||||||
- **✅ CLEAN LOGS**: Can now suppress non-critical TVDB API failure warnings
|
- **✅ CLEAN LOGS**: Can now suppress non-critical TVDB API failure warnings
|
||||||
- **🧹 PRODUCTION**: Cleaner logs for production monitoring
|
- **🧹 PRODUCTION**: Cleaner logs for production monitoring
|
||||||
@@ -54,3 +60,61 @@ SUPPRESS_TVDB_WARNINGS=true # Hide non-critical TVDB failures
|
|||||||
## 🔇 NFOGuard v1.5.2 - Ultra-clean production logs! 🔇
|
## 🔇 NFOGuard v1.5.2 - Ultra-clean production logs! 🔇
|
||||||
|
|
||||||
### Copy SUPPRESS_TVDB_WARNINGS=true to your server .env file and restart!
|
### Copy SUPPRESS_TVDB_WARNINGS=true to your server .env file and restart!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 FIXED: Radarr Rename Event Issue (September 15, 2025)
|
||||||
|
|
||||||
|
### Issue Resolution
|
||||||
|
**COMPLETED**: Fixed missing Radarr rename event handling by adding proper event type filtering.
|
||||||
|
|
||||||
|
### ✅ **Both Sonarr & Radarr Webhook Handling** - **NOW WORKING CORRECTLY**
|
||||||
|
- **Sonarr Location**: `nfoguard.py:1429`
|
||||||
|
- **Radarr Location**: `nfoguard.py:1479` **(FIXED)**
|
||||||
|
- **Event Filtering**: `if event_type not in ["Download", "Upgrade", "Rename"]:`
|
||||||
|
- **✅ STATUS**: **Rename events ARE processed for both systems**
|
||||||
|
- **✅ BEHAVIOR**: Both systems now update NFO files with proper date metadata on rename
|
||||||
|
|
||||||
|
### What Was Fixed
|
||||||
|
1. **Added Event Type Filtering**: Radarr webhooks now explicitly filter for supported events
|
||||||
|
2. **Consistent Processing**: Both Sonarr and Radarr now follow identical webhook workflows
|
||||||
|
3. **Proper Rename Handling**: Rename events trigger full NFO processing pipeline
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📋 NFOGuard Webhook Workflow Documentation
|
||||||
|
|
||||||
|
### 🎬 **Radarr Webhook Workflow**
|
||||||
|
1. **Import Event**:
|
||||||
|
- Check database - if not seen before, current timestamp = truth of first import
|
||||||
|
- Update movie.nfo with proper date metadata
|
||||||
|
|
||||||
|
2. **Rename Event**:
|
||||||
|
- Check database - if we have the date, use existing date
|
||||||
|
- Update movie.nfo file as always (preserving original import date)
|
||||||
|
|
||||||
|
3. **Rename Event (No Database Entry)**:
|
||||||
|
- Check Radarr database for earliest import date
|
||||||
|
- If found, use earliest import date → update database + movie.nfo
|
||||||
|
- If no import date found, use digital/theatrical release date (fallback logic)
|
||||||
|
|
||||||
|
### 📺 **Sonarr Webhook Workflow**
|
||||||
|
1. **Import Event**:
|
||||||
|
- Check database - if not seen before, current timestamp = truth of first import
|
||||||
|
- Update episode.nfo with proper date metadata
|
||||||
|
|
||||||
|
2. **Rename Event**:
|
||||||
|
- Check database - if we have the date, use existing date
|
||||||
|
- Update episode.nfo file as always (preserving original import date)
|
||||||
|
|
||||||
|
3. **Rename Event (No Database Entry)**:
|
||||||
|
- Check Sonarr API for earliest import date
|
||||||
|
- If found, use earliest import date → update database + episode.nfo
|
||||||
|
- If no import date found, use air date (fallback logic)
|
||||||
|
|
||||||
|
### 🔄 **Key Processing Logic**
|
||||||
|
- **Database First**: Always check NFOGuard database for existing dates
|
||||||
|
- **Import Truth**: Webhook import events establish "source of truth" timestamps
|
||||||
|
- **Date Preservation**: Rename events preserve original import dates, never overwrite
|
||||||
|
- **Smart Fallbacks**: API queries → Release dates → Air dates → File dates (configurable)
|
||||||
|
- **Batch Processing**: All webhooks go through batching system with configurable delays
|
||||||
@@ -1474,6 +1474,11 @@ async def radarr_webhook(request: Request, background_tasks: BackgroundTasks):
|
|||||||
_log("INFO", f"Received Radarr webhook: {payload.get('eventType', 'Unknown')}")
|
_log("INFO", f"Received Radarr webhook: {payload.get('eventType', 'Unknown')}")
|
||||||
_log("DEBUG", f"Full Radarr webhook payload: {payload}")
|
_log("DEBUG", f"Full Radarr webhook payload: {payload}")
|
||||||
|
|
||||||
|
# Filter supported event types (same as Sonarr: Download, Upgrade, Rename)
|
||||||
|
event_type = payload.get('eventType', '')
|
||||||
|
if event_type not in ["Download", "Upgrade", "Rename"]:
|
||||||
|
return {"status": "ignored", "reason": f"Event type {event_type} not processed"}
|
||||||
|
|
||||||
# Extract movie info
|
# Extract movie info
|
||||||
movie_data = payload.get("movie", {})
|
movie_data = payload.get("movie", {})
|
||||||
if not movie_data:
|
if not movie_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user