nfo fix again

This commit is contained in:
2025-09-14 13:44:56 -04:00
parent 49266d651a
commit e7b65cfed6
3 changed files with 36 additions and 42 deletions
+18 -28
View File
@@ -1,37 +1,27 @@
# NFOGuard Development Summary
## Current Status: v1.3.6 - NFO Preservation Fix
## Current Status: v1.3.7 - NFO XML Parsing Fix
### 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
### Latest Updates (v1.3.7)
- ** FIXED**: XML comment parsing error causing NFO creation to fail
- **🔧 XML HANDLING**: Improved XML comment insertion and file writing
- **✅ PRESERVATION**: Existing movie metadata properly preserved during updates
- **🎯 ROBUST**: Better error handling for malformed XML files
### 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>
### NFO Update Process (Fixed)
```
1. ✅ Load existing movie.nfo (if exists)
2. ✅ Parse and validate XML structure
3. ✅ Remove old NFOGuard elements to avoid duplicates
4. ✅ Preserve all existing content (title, plot, cast, etc.)
5. ✅ Add/update NFOGuard fields (dateadded, lockdata, uniqueid)
6. ✅ Write properly formatted XML with comment
```
**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
### Error Resolution
- **v1.3.6**: XML comment handling caused `'()` error
- **v1.3.7**: Fixed comment insertion and XML serialization
- **Result**: NFO files now update correctly while preserving contentlopment Summary
## Current Status: v1.3.3 - Database Migration & Path Validation Complete