From 4c10bda4e58813556ee0c23952b8aec80522143a Mon Sep 17 00:00:00 2001 From: itouakirai Date: Sun, 24 Aug 2025 07:31:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BD=93=E5=88=9D=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=92=8C=E4=BD=BF=E7=94=A8=E5=91=BD=E4=BB=A4status=E6=97=B6?= =?UTF-8?q?=E6=89=93=E5=8D=B0wm=E5=AE=9E=E4=BE=8B=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E5=B7=B2=E7=99=BB=E5=BD=95=E5=B8=90=E5=8F=B7=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cmd.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cmd.py b/src/cmd.py index ac445a3..45f05e6 100644 --- a/src/cmd.py +++ b/src/cmd.py @@ -32,6 +32,7 @@ class InteractiveShell: loop.run_until_complete(run_sync(it(WebAPI).init)) loop.run_until_complete(it(WrapperManager).init(it(Config).instance.url, it(Config).instance.secure)) safely_create_task(it(WrapperManager).decrypt_init(on_success=on_decrypt_success, on_failure=on_decrypt_failed)) + loop.run_until_complete(self.show_status()) self.parser = argparse.ArgumentParser(exit_on_error=False) subparser = self.parser.add_subparsers() @@ -43,8 +44,13 @@ class InteractiveShell: download_parser.add_argument("-f", "--force", default=False, action="store_true") download_parser.add_argument("--include-participate-songs", default=False, dest="include", action="store_true") + subparser.add_parser("status") subparser.add_parser("exit") + async def show_status(self): + st_resp = await it(WrapperManager).status() + print(f"Regions available on wm instace: {st_resp.regions}") + async def command_parser(self, cmd: str): if not cmd.strip(): return @@ -57,6 +63,8 @@ class InteractiveShell: match cmds[0]: case "download" | "dl": await self.do_download(args.url, args.codec, args.force, args.include) + case "status": + await self.show_status() case "exit": self.loop.stop() sys.exit()