From 7961045e1cf932412cef7dea11be38b09c58276b Mon Sep 17 00:00:00 2001 From: EillesWan Date: Sun, 21 Jul 2024 16:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=E9=BB=98=E8=AE=A4=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E7=9A=84=E4=BF=AE=E5=A4=8D=EF=BC=9A-pgb=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=BB=98=E8=AE=A4=E4=B8=BA=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trimo_plugin_msctconverter/msctexec.py | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/plugins/trimo_plugin_msctconverter/msctexec.py b/src/plugins/trimo_plugin_msctconverter/msctexec.py index a6d9cb5..f39a052 100644 --- a/src/plugins/trimo_plugin_msctconverter/msctexec.py +++ b/src/plugins/trimo_plugin_msctconverter/msctexec.py @@ -497,13 +497,10 @@ linglun_convert = on_alconna( ), Option("-t|-type", default="all", args=Args["type", str, "all"]), Option("-htp|--high-time-precision", default=False, action=store_true), + # Option("-dpb|--disable-progress-bar", default=False, action=store_true), Option( "-pgb|--progress-bar", - default={ - "base_s": r"▶ %%N [ %%s/%^s %%% §e__________§r %%t|%^t ]", - "to_play_s": r"§7=", - "played_s": r"=", - }, + default=None, args=Args["base_s", str, r"▶ %%N [ %%s/%^s %%% §e__________§r %%t|%^t ]"][ "to_play_s", str, r"§7=" ]["played_s", str, r"="], @@ -596,6 +593,7 @@ async def _( # await musicreater_convert.finish( # UniMessage.text(json.dumps(_args, indent=4, sort_keys=True, ensure_ascii=False)) # ) + nonebot.logger.info(_args) usr_data_path = database_dir / usr_id (usr_temp_path := temporary_dir / usr_id).mkdir(exist_ok=True) @@ -685,7 +683,11 @@ async def _( try: - progress_bar_style = Musicreater.ProgressBarStyle(**_args["progress-bar"]) + progress_bar_style = ( + Musicreater.ProgressBarStyle(**_args["progress-bar"]) + if _args["progress-bar"] + else None + ) all_files: dict[str, dict[str, dict[str, int | tuple | str | list]]] = {} @@ -927,6 +929,28 @@ async def _( at_sender=True, ) +reset_point = on_alconna( + command=Alconna("设置点数"), + aliases={ + "设置转换点数", + "set_convert_point", + "reset_cvt_pnt", + "setcp", + "set_convert_point", + "重设转换点数", + }, + permission=SUPERUSER, + rule=nonebot.rule.to_me(), +) + + +@reset_point.handle() +async def _( + event: T_MessageEvent, + bot: T_Bot, +): + pass + execute_cmd_convert_ablity = on_alconna( command=Alconna("指令自动更新"),