@@ -843,31 +843,36 @@ def save_library_backup_to_disk(self) -> str:
843
843
844
844
def clear_internal_vars (self ):
845
845
"""Clears the internal variables of the Library object."""
846
+
847
+ # Reset Directory Data =================================================
846
848
self .library_dir = None
847
- self .is_legacy_library = False
848
849
850
+ # Reset Entries ========================================================
849
851
self .entries .clear ()
850
852
self ._next_entry_id = 0
851
- # self.filtered_entries.clear()
852
853
self ._entry_id_to_index_map .clear ()
853
-
854
- self ._collation_id_to_index_map .clear ()
855
-
856
854
self .missing_matches = {}
857
855
self .dir_file_count = - 1
858
856
self .files_not_in_library .clear ()
859
857
self .missing_files .clear ()
860
858
self .fixed_files .clear ()
861
859
self .filename_to_entry_id_map : dict [Path , int ] = {}
862
- self .ext_list = self .default_ext_exclude_list
863
860
861
+ # Reset Tags ===========================================================
864
862
self .tags .clear ()
865
863
self ._next_tag_id = 1000
866
864
self ._tag_strings_to_id_map = {}
867
865
self ._tag_id_to_cluster_map = {}
868
866
self ._tag_id_to_index_map = {}
869
867
self ._tag_entry_ref_map .clear ()
870
868
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
+
871
876
def refresh_dir (self ) -> Generator :
872
877
"""Scans a directory for files, and adds those relative filenames to internal variables."""
873
878
0 commit comments