From 2e00e08560bbf5dea005e3770a262306bf206d56 Mon Sep 17 00:00:00 2001 From: "dr.lt.data" Date: Mon, 21 Aug 2023 13:40:41 +0900 Subject: [PATCH] fix: subscription list bugfix --- __init__.py | 10 +++++++--- js/comfyui-manager.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index 89293d0..4fbb56c 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.25.1)") +print("### Loading: ComfyUI-Manager (V0.25.2)") comfy_ui_required_revision = 1240 comfy_ui_revision = "Unknown" @@ -1036,8 +1036,12 @@ async def badge_mode(request): @server.PromptServer.instance.routes.get("/manager/subscription_url_list") async def subscription_url_list(request): if "value" in request.rel_url.query: - get_config()['subscription_url_list'] = request.rel_url.query['value'] - write_config() + for item in get_config()['subscription_url_list'].split(','): + name_url = item.split("::") + if len(name_url) == 2 and name_url[0] == request.rel_url.query['value']: + get_config()['subscription_url'] = name_url[1] + write_config() + break else: return web.Response(text=get_config()['subscription_url_list'], status=200) diff --git a/js/comfyui-manager.js b/js/comfyui-manager.js index b265a50..a6cf139 100644 --- a/js/comfyui-manager.js +++ b/js/comfyui-manager.js @@ -1794,7 +1794,7 @@ class ManagerMenuDialog extends ComfyDialog { for(let i in urls) { if(urls[i] != '') { let name_url = urls[i].split('::'); - subscription_combo.appendChild($el('option', {value:name_url[1] , text:`subscribe: ${name_url[0]}`}, [])); + subscription_combo.appendChild($el('option', {value:name_url[0], text:`subscribe: ${name_url[0]}`}, [])); } }