This commit is contained in:
2025-09-14 13:40:22 -04:00
parent 05ba16666e
commit 49266d651a
3 changed files with 70 additions and 29 deletions
+28 -18
View File
@@ -1,27 +1,37 @@
# NFOGuard Development Summary
## Current Status: v1.3.4 - Complete Database Migration Fix
## Current Status: v1.3.6 - NFO Preservation Fix
### Latest Updates (v1.3.4)
- **🔧 DATABASE**: Fixed comprehensive schema migration for all missing columns
- **✅ MIGRATION**: Added automatic detection and addition of `path`, `has_video_file`, `last_updated` columns
- **🎯 ROBUST**: Schema introspection ensures all required columns exist
- **🔍 VALIDATION**: Comprehensive column checking for both movies and episodes tables
### Latest Updates (v1.3.6)
- **🔧 NFO MANAGER**: Fixed movie.nfo to preserve existing content instead of overwriting
- **✅ PRESERVATION**: Existing movie metadata (title, plot, actors, etc.) now maintained
- **🎯 TARGETED**: Only updates NFOGuard-managed fields (dateadded, uniqueid, lockdata)
- **🧹 CLEANUP**: Removes old NFOGuard elements before adding new ones to avoid duplicates
### Database Migration Strategy
```
✅ Check existing schema with PRAGMA table_info()
✅ Add missing columns: path, has_video_file, last_updated
✅ Update existing records with default values
✅ Handle both movies and episodes tables
✅ Graceful migration without data loss
### NFO Management Behavior (Fixed)
**Before (v1.3.5 and earlier):**
```xml
<!-- Full existing NFO with title, plot, cast, etc. -->
↓ NFOGuard processing
<movie>
<!-- Only NFOGuard fields - ALL EXISTING CONTENT LOST -->
</movie>
```
### Path Mapping Success (v1.3.2-v1.3.4)
- **🐛 CRITICAL**: Fixed substring matching bug (movies/movies6, tv/tv6)
- **🎯 ALGORITHM**: Longest-path-first matching prevents incorrect mappings
- **📝 DEBUG**: Comprehensive debug logging for troubleshooting
- **✅ TESTED**: Annabelle webhook processes correctly through all stageslopment Summary
**After (v1.3.6):**
```xml
<!-- Full existing NFO with title, plot, cast, etc. -->
↓ NFOGuard processing
<movie>
<!-- NFOGuard comment and fields added -->
<!-- ALL EXISTING CONTENT PRESERVED -->
<title>Existing Title</title>
<plot>Existing Plot</plot>
<!-- ... existing content ... -->
<dateadded>2025-09-14T13:37:14-04:00</dateadded>
<lockdata>true</lockdata>
</movie>
```lopment Summary
## Current Status: v1.3.3 - Database Migration & Path Validation Complete