fix:updates for interface
Local Docker Build (Dev) / build-dev (push) Successful in 4s

This commit is contained in:
2025-10-14 16:38:30 -04:00
parent f903606d3a
commit 66ba17991e
2 changed files with 27 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
2.1.4
2.1.6
+26 -4
View File
@@ -156,8 +156,19 @@ class NFOManager:
# Consider it NFOGuard-managed if it has lockdata=true (with or without dateadded)
if lockdata_elem is not None and lockdata_elem.text == "true":
# Extract original source from NFOGuard comment, default to nfo_file_existing
source = "nfo_file_existing"
# Parse XML content to find NFOGuard comment with source
nfo_content = nfo_path.read_text(encoding='utf-8')
import re
source_match = re.search(r'<!--\s*NFOGuard\s*-\s*Source:\s*([^-]+?)\s*-->', nfo_content)
if source_match:
source = source_match.group(1).strip()
print(f"🔍 Extracted original source from NFO comment: {source}")
result = {
"source": "nfo_file_existing"
"source": source
}
if dateadded_elem is not None and dateadded_elem.text:
@@ -169,7 +180,7 @@ class NFOManager:
if aired_elem is not None and aired_elem.text:
result["aired"] = aired_elem.text.strip()
print(f"✅ Found NFOGuard data in NFO: dateadded={result.get('dateadded', 'None')}, released={result.get('released', 'None')}, aired={result.get('aired', 'None')}")
print(f"✅ Found NFOGuard data in NFO: dateadded={result.get('dateadded', 'None')}, source={source}, released={result.get('released', 'None')}, aired={result.get('aired', 'None')}")
return result
except (ET.ParseError, Exception) as e:
@@ -197,8 +208,19 @@ class NFOManager:
# Consider it NFOGuard-managed if it has lockdata=true (with or without dateadded)
if lockdata_elem is not None and lockdata_elem.text == "true":
# Extract original source from NFOGuard comment, default to episode_nfo_existing
source = "episode_nfo_existing"
# Parse XML content to find NFOGuard comment with source
nfo_content = nfo_path.read_text(encoding='utf-8')
import re
source_match = re.search(r'<!--\s*NFOGuard\s*-\s*Source:\s*([^-]+?)\s*-->', nfo_content)
if source_match:
source = source_match.group(1).strip()
print(f"🔍 Extracted original source from episode NFO comment: {source}")
result = {
"source": "episode_nfo_existing"
"source": source
}
if dateadded_elem is not None and dateadded_elem.text:
@@ -207,7 +229,7 @@ class NFOManager:
if aired_elem is not None and aired_elem.text:
result["aired"] = aired_elem.text.strip()
print(f"✅ Found NFOGuard data in episode NFO S{season_num:02d}E{episode_num:02d}: dateadded={result.get('dateadded', 'None')}, aired={result.get('aired', 'None')}")
print(f"✅ Found NFOGuard data in episode NFO S{season_num:02d}E{episode_num:02d}: dateadded={result.get('dateadded', 'None')}, source={source}, aired={result.get('aired', 'None')}")
return result
except (ET.ParseError, Exception) as e: