From e9704e9a4da06b6bab24d07d0e6f034d80452a20 Mon Sep 17 00:00:00 2001 From: qwint Date: Sat, 7 Dec 2024 14:43:27 -0600 Subject: [PATCH] expose the urlparse response so clients who want different formats can use as well --- CommonClient.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CommonClient.py b/CommonClient.py index 09771170d421..ad3144cf568e 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -1031,10 +1031,14 @@ def get_base_parser(description: typing.Optional[str] = None): def handle_url_arg(args: "argparse.Namespace", parser: "typing.Optional[argparse.ArgumentParser]" = None) -> "argparse.Namespace": - """ handle if text client is launched using the "archipelago://name:pass@host:port" url from webhost """ + """ + Parse the url arg "archipelago://name:pass@host:port" from launcher into correct launch args for CommonClient + If alternate data is required the urlparse response is saved back to args.url if valid + """ if args.url: url = urllib.parse.urlparse(args.url) if url.scheme == "archipelago": + args.url = url args.connect = url.netloc if url.username: args.name = urllib.parse.unquote(url.username)