Add configurable TV webhook processing modes (targeted vs series)
⚙️ 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
This commit is contained in:
@@ -123,6 +123,11 @@ TV_SEASON_DIR_FORMAT=Season {season:02d}
|
||||
# Examples: "season " -> matches "Season 01", "s" -> matches "S01", "season" -> matches "Season01"
|
||||
TV_SEASON_DIR_PATTERN=season
|
||||
|
||||
# TV webhook processing mode (v0.6.0+)
|
||||
# targeted = Only process episodes mentioned in webhook (efficient, recommended)
|
||||
# series = Process entire series directory (comprehensive, current default)
|
||||
TV_WEBHOOK_PROCESSING_MODE=targeted
|
||||
|
||||
# ===========================================
|
||||
# LOGGING
|
||||
# ===========================================
|
||||
|
||||
Reference in New Issue
Block a user