mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 02:12:58 +08:00
fix parse aria2 host (#829)
This commit is contained in:
parent
17895916f8
commit
96dbc71ad4
@ -1,11 +1,14 @@
|
|||||||
import os
|
import os
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
aria2 = os.getenv('COMFYUI_MANAGER_ARIA2_SERVER')
|
aria2 = os.getenv('COMFYUI_MANAGER_ARIA2_SERVER')
|
||||||
HF_ENDPOINT = os.getenv('HF_ENDPOINT')
|
HF_ENDPOINT = os.getenv('HF_ENDPOINT')
|
||||||
|
|
||||||
if aria2 is not None:
|
if aria2 is not None:
|
||||||
secret = os.getenv('COMFYUI_MANAGER_ARIA2_SECRET')
|
secret = os.getenv('COMFYUI_MANAGER_ARIA2_SECRET')
|
||||||
host, port = aria2.split(':')
|
url = urlparse(aria2)
|
||||||
|
port = url.port
|
||||||
|
host = url.scheme + '://' + url.hostname
|
||||||
import aria2p
|
import aria2p
|
||||||
|
|
||||||
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))
|
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user