From 96dbc71ad4a460dc680a818a173fa7dd0da34c43 Mon Sep 17 00:00:00 2001 From: dishuostec <384801+dishuostec@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:51:16 +0800 Subject: [PATCH] fix parse aria2 host (#829) --- glob/manager_downloader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glob/manager_downloader.py b/glob/manager_downloader.py index 56bf8fa6..8a8c73c0 100644 --- a/glob/manager_downloader.py +++ b/glob/manager_downloader.py @@ -1,11 +1,14 @@ import os +from urllib.parse import urlparse aria2 = os.getenv('COMFYUI_MANAGER_ARIA2_SERVER') HF_ENDPOINT = os.getenv('HF_ENDPOINT') if aria2 is not None: secret = os.getenv('COMFYUI_MANAGER_ARIA2_SECRET') - host, port = aria2.split(':') + url = urlparse(aria2) + port = url.port + host = url.scheme + '://' + url.hostname import aria2p aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))