This commit is contained in:
space-nuko 2023-05-14 17:50:41 -05:00
parent 6ff500cac8
commit ba6d6de2ae
2 changed files with 7 additions and 17 deletions

View File

@ -139,21 +139,12 @@ def get_full_path(folder_name, filename):
return full_path return full_path
path_cache_dict = {}
def clear_cache():
global path_cache_dict
path_cache_dict = {}
def get_filename_list(folder_name): def get_filename_list(folder_name):
global folder_names_and_paths, path_cache_dict global folder_names_and_paths
print("RecursiveWalk! " + folder_name) output_list = set()
if folder_name not in path_cache_dict: folders = folder_names_and_paths[folder_name]
output_list = set() for x in folders[0]:
folders = folder_names_and_paths[folder_name] output_list.update(filter_files_extensions(recursive_search(x), folders[1]))
for x in folders[0]: return sorted(list(output_list))
output_list.update(filter_files_extensions(recursive_search(x), folders[1]))
path_cache_dict[folder_name] = sorted(list(output_list))
return path_cache_dict[folder_name]

View File

@ -264,7 +264,6 @@ class PromptServer():
@routes.get("/object_info") @routes.get("/object_info")
async def get_object_info(request): async def get_object_info(request):
out = {} out = {}
folder_paths.clear_cache()
for x in nodes.NODE_CLASS_MAPPINGS: for x in nodes.NODE_CLASS_MAPPINGS:
obj_class = nodes.NODE_CLASS_MAPPINGS[x] obj_class = nodes.NODE_CLASS_MAPPINGS[x]
info = {} info = {}