diff --git a/changeRestore.py b/changeRestore.py index 3ad1731..a29439d 100644 --- a/changeRestore.py +++ b/changeRestore.py @@ -6,15 +6,11 @@ editlist=[{ "changs":[ { "primit":'''else: - return web.json_response({"error": "no prompt", "node_errors": []}, status=400)''', + error = {''', "edit":'''elif 'prompt_id' in json_data: return web.json_response(json_data) else: - return web.json_response({"error": "no prompt", "node_errors": []}, status=400)''' - }, - { - "primit":'''info['display_name'] = nodes.NODE_DISPLAY_NAME_MAPPINGS[node_class] if node_class in nodes.NODE_DISPLAY_NAME_MAPPINGS.keys() else node_class''', - "edit":'''info['display_name'] = self.displayName[node_class] if hasattr(self,'displayName') and node_class in self.displayName.keys() else nodes.NODE_DISPLAY_NAME_MAPPINGS[node_class] if node_class in nodes.NODE_DISPLAY_NAME_MAPPINGS.keys() else node_class''' + error = {''' } ] },{ diff --git a/py/WeChatAuth.py b/py/WeChatAuth.py index 6099c85..00b7daf 100644 --- a/py/WeChatAuth.py +++ b/py/WeChatAuth.py @@ -1172,27 +1172,11 @@ async def handleMessagePost(request): logging.error('事件处理异常:'+str(e)) return web.Response(status=200) -custom_nodes_path=folder_paths.get_folder_paths('custom_nodes')[0] -custom_nodes_path=os.path.join(custom_nodes_path,'AIGODLIKE-ComfyUI-Translation') -custom_nodes_path=os.path.join(custom_nodes_path,Config().base.get('language','zh-CN'),'Nodes') -NODE_LANGEUAGE_DISPLAY_NAME_MAPPINGS={} -if os.path.exists(custom_nodes_path): - for file in os.listdir(custom_nodes_path): - if file.endswith('.json'): - json_file=os.path.join(custom_nodes_path, file) - if os.path.isfile(json_file): - f = open(json_file,'r', encoding='utf-8') - data = json.load(f) - f.close() - for key in data: - if 'title' in data[key]: - NODE_LANGEUAGE_DISPLAY_NAME_MAPPINGS[key]=data[key]['title'] - +# custom_nodes_path=folder_paths.get_folder_paths('custom_nodes')[0] PromptServer.instance.send_sync=types.MethodType(send_sync,PromptServer.instance) PromptServer.instance.old_trigger_on_prompt=PromptServer.instance.trigger_on_prompt PromptServer.instance.trigger_on_prompt=types.MethodType(trigger_on_prompt,PromptServer.instance) -if hasattr(PromptServer.instance,"displayName")==False: - setattr(PromptServer.instance,"displayName",NODE_LANGEUAGE_DISPLAY_NAME_MAPPINGS) + if Config().cluster: if'redis'==Config().cluster["clusterType"] and r: #添加订阅消息 if Config().cluster["isMain"]: