修复排除路由搞丢了BUG-_-!

This commit is contained in:
LAOGOU-666
2025-03-16 06:45:43 +08:00
parent 9bed84658c
commit a1f3589f1b
2 changed files with 21 additions and 5 deletions
+14
View File
@@ -57,6 +57,20 @@ async def update_exclude_modules(request):
return web.json_response({"status": "success"})
except Exception as e:
return web.json_response({"status": "error", "message": str(e)}, status=500)
@PromptServer.instance.routes.get("/hotreload/get_all_modules")
async def get_all_modules(request):
try:
modules = []
for item in os.listdir(CUSTOM_NODE_ROOT[0]):
item_path = os.path.join(CUSTOM_NODE_ROOT[0], item)
if os.path.isdir(item_path) and not item.startswith('.'):
if os.path.exists(os.path.join(item_path, '__init__.py')):
modules.append(item)
return web.json_response({"modules": modules})
except Exception as e:
return web.json_response({"status": "error", "message": str(e)}, status=500)
if (HOTRELOAD_EXCLUDE := os.getenv("HOTRELOAD_EXCLUDE", None)) is not None:
EXCLUDE_MODULES.update(x for x in HOTRELOAD_EXCLUDE.split(',') if x)
HOTRELOAD_OBSERVE_ONLY: set[str] = set(x for x in os.getenv("HOTRELOAD_OBSERVE_ONLY", '').split(',') if x)
+7 -5
View File
@@ -3,12 +3,14 @@
"ComfyUI-IF_AI_tools",
"rgthree-comfy",
"comfyui-kjnodes",
"ComfyUI-LG_HotReload",
"AIGODLIKE-ComfyUI-Translation",
"comfyui_layerstyle",
"ComfyUI-Manager",
"ComfyUI-Depth-Pro",
"ComfyUI-Depth-Anything-Tensorrt",
"comfyui_layerstyle",
"ComfyUI-Crystools",
"ComfyUI_Custom_Nodes_AlekPet",
"Comfyui-LG_Relight"
"AIGODLIKE-ComfyUI-Translation",
"ComfyUI-LG_HotReload",
"ComfyUI-Easy-Use",
"ComfyUI_Custom_Nodes_AlekPet"
]
}