Documentation Enhancement:
- Add missing TVDB_API_KEY to all relevant sections in README.md
- Create comprehensive API keys reference table with purposes and sources
- Add centralized API Keys Configuration section with clear examples
- Document how to resolve "TVDB API key not configured" warnings
- Include direct links to obtain API keys from each service
API Keys Covered:
- TMDB_API_KEY - Movie release dates and metadata fallbacks
- TVDB_API_KEY - TV show metadata and Emby compatibility (was missing!)
- RADARR_API_KEY - Movie import history and database access
- SONARR_API_KEY - TV episode import history
This resolves user questions about the TVDB API key warning and provides
complete documentation for all external API integrations.
📚 Comprehensive Documentation Update:
• Added TV webhook processing modes section to README.md
• Updated CHANGELOG.md with configurable processing feature details
• Enhanced SETUP.md with TV_WEBHOOK_PROCESSING_MODE configuration
• Added Step 7 testing procedures to TESTING.md for both modes
🔧 Configuration Documentation:
• Targeted Mode (default): Only process episodes mentioned in webhook
• Series Mode: Process entire series directory (legacy behavior)
• Smart fallback logic when episode data unavailable
• Clear examples and use case recommendations
📋 Testing Instructions:
• Step-by-step mode switching procedures
• Expected log output examples for each mode
• Environment variable configuration examples
• Docker restart procedures for testing
✨ User Benefits Documented:
• Efficiency comparison: targeted vs series processing
• File operation reduction for targeted mode
• Media server notification minimization
• Backward compatibility with existing setups
⚙️ New Configuration Option:
• Added TV_WEBHOOK_PROCESSING_MODE environment variable
• targeted = Only process episodes mentioned in webhook (efficient, default)
• series = Process entire series directory (comprehensive, previous behavior)
🎯 Targeted Episode Processing:
• New process_webhook_episodes() method for precise processing
• Only updates NFOs for downloaded episodes (e.g., just S41E07)
• Reduces unnecessary file operations and Emby notifications
• Falls back to series processing if no episode data in webhook
🔧 Implementation Details:
• Modified Sonarr webhook handler to pass episode data
• Enhanced batch processor with mode detection
• Maintains backward compatibility with existing behavior
• Added comprehensive logging for processing mode selection
✨ Benefits:
• Efficient: 1 download = 1 episode processed (not entire series)
• Configurable: Users can choose preferred behavior via .env
• Compatible: Works with existing autoscan/Emby refresh systems
• Smart: Falls back gracefully when episode data unavailable
📚 Documentation Updates:
• Updated CHANGELOG.md with comprehensive v0.6.0 feature list
• Enhanced README.md with new TV processing endpoints and examples
• Updated SETUP.md with required Sonarr API key configuration
• Enhanced TESTING.md with v0.6.0 TV testing procedures
• Updated .env templates with proper Sonarr requirements
🔧 Configuration Updates:
• Mark SONARR_API_KEY as REQUIRED for v0.6.0+ Enhanced TV NFOs
• Updated version examples from 0.5.1 to 0.6.0
• Added JSON response examples for new TV endpoints
• Clarified URL-safe vs URL-encoded endpoint options
📋 Complete File Review:
• Verified all Python imports are consistent across modules
• Confirmed all typing imports (Dict, Any, List, Optional) are present
• Validated configuration templates match actual requirements
• Added comprehensive testing procedures for TV enhancements
✅ Ready for Production:
• All endpoints documented with examples
• Configuration requirements clearly specified
• Testing procedures comprehensive for troubleshooting
• Backward compatibility maintained throughout
✨ Features Added:
• Single season/episode processing capability via new endpoints
• Enhanced NFO generation with full Sonarr API metadata (titles, plots, ratings)
• NFOGuard timestamp tracking in all NFO source comments
• URL-safe /tv/scan-season and /tv/scan-episode endpoints
🔧 Technical Improvements:
• Fixed URL encoding issues for paths with spaces and special characters
• Enhanced TVProcessor with process_season() and process_episode_file() methods
• Rich metadata extraction from Sonarr API (episode titles, plots, runtime, ratings)
• XML escaping for special characters in metadata
• Comprehensive episode parsing (SxxExx and numeric formats)
📚 Documentation:
• Updated README with new TV processing endpoints
• Added enhanced NFO generation examples showing before/after
• Documented URL-safe alternatives to manual scan paths
🎯 User Benefits:
• Can now process single seasons: Chicago Fire Season 13
• Can now process single episodes: S13E21 files
• Enhanced NFO files with full episode metadata for better Emby/Plex experience
• Timestamps show when NFOGuard processed each file
- Added detailed explanation of 4-tier fallback hierarchy
- Documents all TMDB release types (1-6) with clear descriptions
- Explains rename-first detection and Radarr NFO fallback logic
- Shows difference between import_then_digital vs digital_then_import priorities
- Version bumped to 0.2.21