mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-25 11:04:07 +00:00
Fixed custom props not being loaded.
This commit is contained in:
parent
e641cef6f1
commit
b84e3f77f3
1 changed files with 14 additions and 0 deletions
|
|
@ -975,6 +975,7 @@ def parse_programs_for_tvg_id(epg_id):
|
|||
|
||||
# Extract custom properties
|
||||
custom_props = extract_custom_properties(elem)
|
||||
custom_properties_json = None
|
||||
|
||||
if custom_props:
|
||||
logger.trace(f"Number of custom properties: {len(custom_props)}")
|
||||
|
|
@ -1022,6 +1023,19 @@ def parse_programs_for_tvg_id(epg_id):
|
|||
|
||||
except Exception as e:
|
||||
logger.error(f"Error processing program for {epg.tvg_id}: {e}", exc_info=True)
|
||||
else:
|
||||
# Immediately clean up non-matching elements to reduce memory pressure
|
||||
elem.clear()
|
||||
parent = elem.getparent()
|
||||
if parent is not None:
|
||||
while elem.getprevious() is not None:
|
||||
del parent[0]
|
||||
try:
|
||||
parent.remove(elem)
|
||||
except (ValueError, KeyError, TypeError):
|
||||
pass
|
||||
del elem
|
||||
continue
|
||||
|
||||
# Important: Clear the element to avoid memory leaks using a more robust approach
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue