diff --git a/__init__.py b/__init__.py index 1194c4e1..2090218c 100644 --- a/__init__.py +++ b/__init__.py @@ -55,7 +55,7 @@ sys.path.append('../..') from torchvision.datasets.utils import download_url # ensure .js -print("### Loading: ComfyUI-Manager (V0.28.7)") +print("### Loading: ComfyUI-Manager (V0.28.8)") comfy_ui_required_revision = 1240 comfy_ui_revision = "Unknown" @@ -500,10 +500,15 @@ def check_custom_nodes_installed(json_obj, do_fetch=False, do_update_check=True, if do_fetch: print(f"\x1b[2K\rFetching done.") elif do_update: - print(f"\x1b[2K\rUpdate done.") + update_exists = any(item['installed'] == 'Update' for item in json_obj['custom_nodes']) + if update_exists: + print(f"\x1b[2K\rUpdate done.") + else: + print(f"\x1b[2K\rAll extensions are already up-to-date.") elif do_update_check: print(f"\x1b[2K\rUpdate check done.") + @server.PromptServer.instance.routes.get("/customnode/getmappings") async def fetch_customnode_mappings(request): if request.rel_url.query["mode"] == "local": @@ -549,6 +554,11 @@ async def update_all(request): json_obj = await get_data(uri) check_custom_nodes_installed(json_obj, do_update=True) + update_exists = any(item['installed'] == 'Update' for item in json_obj['custom_nodes']) + + if update_exists: + return web.Response(status=201) + return web.Response(status=200) except: return web.Response(status=400) diff --git a/js/comfyui-manager.js b/js/comfyui-manager.js index f58b9745..88e78580 100644 --- a/js/comfyui-manager.js +++ b/js/comfyui-manager.js @@ -265,9 +265,15 @@ async function updateAll(update_check_checkbox) { app.ui.dialog.element.style.zIndex = 9999; return false; } - - app.ui.dialog.show('ComfyUI and all extensions have been updated to the latest version.'); - app.ui.dialog.element.style.zIndex = 9999; + if(response1.status == 201 || response2.status == 201) { + app.ui.dialog.show('ComfyUI and all extensions have been updated to the latest version.'); + app.ui.dialog.element.style.zIndex = 9999; + update_check_checkbox.checked = false; + } + else { + app.ui.dialog.show('ComfyUI and all extensions are already up-to-date with the latest versions.'); + app.ui.dialog.element.style.zIndex = 9999; + } return true; }