dates at bottom

This commit is contained in:
2025-09-14 13:54:04 -04:00
parent 179f8f51d7
commit d7db924510
3 changed files with 46 additions and 30 deletions
+22 -18
View File
@@ -1,36 +1,40 @@
# NFOGuard Development Summary
## Current Status: v1.3.8 - NFO Field Ordering Fix
## Current Status: v1.4.0 - Complete Date Field Management
### Latest Updates (v1.3.8)
- **🎯 FIELD ORDERING**: NFOGuard fields now append at bottom of existing NFO content
- **📋 STRUCTURE**: Date fields (premiered, dateadded, lockdata) appear after all existing metadata
- **✅ PRESERVATION**: All existing content (actors, plot, ratings, etc.) maintained in original order
- **🧹 SMART CLEANUP**: Only removes NFOGuard-added elements, preserves existing uniqueid[tmdb]
### Latest Updates (v1.4.0)
- **🎯 ALL DATE FIELDS**: Now moves premiered, year, dateadded, and lockdata to bottom
- **📋 COMPREHENSIVE**: Removes existing premiered/year fields and re-adds at bottom
- **✅ PRESERVATION**: Preserves existing premiered date if no new release date provided
- **🧹 CLEAN STRUCTURE**: All date/metadata fields grouped together at bottom
### NFO Field Order (Fixed)
**Now places NFOGuard fields at the bottom:**
### Complete NFO Structure (Fixed)
```xml
<movie>
<!-- All existing Radarr/Jellyfin content preserved -->
<title>Movie Title</title>
<title>Annabelle Comes Home</title>
<plot>Plot content...</plot>
<uniqueid type="tmdb" default="true">521029</uniqueid> <!-- preserved -->
<genre>Horror</genre>
<director>Gary Dauberman</director>
<actor>...</actor>
<!-- ... all existing fields ... -->
<!-- ... all existing fields including all actors ... -->
<!-- NFOGuard fields appended at bottom -->
<!-- ALL date/metadata fields at absolute bottom -->
<uniqueid type="imdb" default="true">tt8350360</uniqueid>
<premiered>2019-06-26</premiered> <!-- only if missing -->
<dateadded>2025-09-14T13:45:54-04:00</dateadded>
<premiered>2019-06-26</premiered>
<year>2019</year>
<dateadded>2025-09-14T13:50:34-04:00</dateadded>
<lockdata>true</lockdata>
</movie>
```
### Smart Element Management
- Preserves existing `uniqueid[tmdb]` and other IDs
-Only removes NFOGuard-managed `uniqueid[imdb]` to avoid duplicates
-Appends new fields using `ET.SubElement()` for bottom placement
-Maintains clean XML structure and formatting
### NFOGuard Managed Fields
-`uniqueid[type="imdb"]` - IMDb ID for identification
-`premiered` - Release date (moved to bottom)
-`year` - Extracted from premiered date
-`dateadded` - Import timestamp
-`lockdata` - Prevents metadata overwrites
### Complete Path Processing Pipeline
-**Path Mapping**: Fixed substring matching (movies/movies6, tv/tv6)