fix: NFO processing overhaul - comprehensive metadata management
Commit Message: fix: NFO processing overhaul - comprehensive metadata management MAJOR IMPROVEMENTS: • Enhanced movie detection for directories without IMDb IDs in folder names • Fixed NFO processing to execute before date validation (preserves existing metadata) • Added smart episode NFO migration to standardized S##E## format • Resolved database save issues with proper upsert operations for dateadded values • Implemented comprehensive IMDb ID detection from filenames and NFO content TECHNICAL CHANGES: • nfoguard.py:1008-1025 - Fixed early exit logic to process NFOs regardless of date availability • core/nfo_manager.py - Added find_existing_episode_nfo() and enhanced episode processing • core/database.py - Fixed upsert operations to properly save dateadded values • Enhanced find_movie_imdb_id() to detect IMDb IDs from multiple sources CORE FIXES: • Movie NFO processing now happens before date validation checks • Episode NFOs with long names automatically migrated to S##E## format • Database operations properly handle both new entries and updates • Movies without IMDb in directory names now detected via filenames/NFO content • All existing metadata preserved during NFO standardization RESULTS: ✅ Existing movie.nfo files receive full NFOGuard processing ✅ Episode NFOs standardized to proper S##E## naming convention ✅ Database persistence works correctly for all date scenarios ✅ Enhanced movie detection covers edge cases ✅ Maintained backward compatibility with existing configurations
This commit is contained in: