@@ -843,31 +843,36 @@ def save_library_backup_to_disk(self) -> str:
843843
844844 def clear_internal_vars (self ):
845845 """Clears the internal variables of the Library object."""
846+
847+ # Reset Directory Data =================================================
846848 self .library_dir = None
847- self .is_legacy_library = False
848849
850+ # Reset Entries ========================================================
849851 self .entries .clear ()
850852 self ._next_entry_id = 0
851- # self.filtered_entries.clear()
852853 self ._entry_id_to_index_map .clear ()
853-
854- self ._collation_id_to_index_map .clear ()
855-
856854 self .missing_matches = {}
857855 self .dir_file_count = - 1
858856 self .files_not_in_library .clear ()
859857 self .missing_files .clear ()
860858 self .fixed_files .clear ()
861859 self .filename_to_entry_id_map : dict [Path , int ] = {}
862- self .ext_list = self .default_ext_exclude_list
863860
861+ # Reset Tags ===========================================================
864862 self .tags .clear ()
865863 self ._next_tag_id = 1000
866864 self ._tag_strings_to_id_map = {}
867865 self ._tag_id_to_cluster_map = {}
868866 self ._tag_id_to_index_map = {}
869867 self ._tag_entry_ref_map .clear ()
870868
869+ # Reset Collations =====================================================
870+ self .collations .clear ()
871+ self ._collation_id_to_index_map .clear ()
872+
873+ # Reset Extension List =================================================
874+ self .ext_list = self .default_ext_exclude_list
875+
871876 def refresh_dir (self ) -> Generator :
872877 """Scans a directory for files, and adds those relative filenames to internal variables."""
873878
0 commit comments