diff --git a/VERSION b/VERSION index d615fd0..158c747 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.9.4 +1.9.5 diff --git a/core/nfo_manager.py b/core/nfo_manager.py index 33e222c..2c89215 100644 --- a/core/nfo_manager.py +++ b/core/nfo_manager.py @@ -685,7 +685,7 @@ class NFOManager: if episode.tag != "episodedetails": raise ValueError("Root element is not ") - print(f"📝 Updating standard NFO: {episode_filename}") + print(f"📝 Updating existing NFO: {nfo_path.name}") # Remove existing NFOGuard fields to re-add them at the bottom nfoguard_fields = ["aired", "dateadded", "season", "episode"] @@ -970,8 +970,11 @@ class NFOManager: episode.remove(existing_field) # Remove any existing NFOGuard comments - for child in episode: - if isinstance(child, ET.Comment): + for child in list(episode): + if hasattr(child, 'tag') and child.tag is ET.Comment: + if self.manager_brand in str(child): + episode.remove(child) + elif str(type(child)).find('Comment') != -1: if self.manager_brand in str(child): episode.remove(child)