From 9234e6d3922bff30f06a89a7d6fd0f9e21089eb2 Mon Sep 17 00:00:00 2001 From: EillesWan Date: Sun, 29 Dec 2024 21:22:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E5=95=A5=E7=94=A8=EF=BC=8C=E5=A6=88?= =?UTF-8?q?=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/liteyuki_main/loader.py | 2 +- .../trimo_plugin_msctconverter/msctexec.py | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/liteyuki_main/loader.py b/src/liteyuki_main/loader.py index 91df45e..60be075 100644 --- a/src/liteyuki_main/loader.py +++ b/src/liteyuki_main/loader.py @@ -27,7 +27,7 @@ async def load_plugins(): for installed_plugin in installed_plugins: if not check_for_package(installed_plugin.module_name): nonebot.logger.error( - f"插件 {installed_plugin.module_name} 仍在加载列表中但未安装。" + f"加载列表中的 {installed_plugin.module_name} 插件无法安装,可能是是未找到插件。" ) else: nonebot.load_plugin(installed_plugin.module_name) diff --git a/src/nonebot_plugins/trimo_plugin_msctconverter/msctexec.py b/src/nonebot_plugins/trimo_plugin_msctconverter/msctexec.py index 3f5fd5f..dade56d 100644 --- a/src/nonebot_plugins/trimo_plugin_msctconverter/msctexec.py +++ b/src/nonebot_plugins/trimo_plugin_msctconverter/msctexec.py @@ -783,7 +783,7 @@ async def _( else result.options[arg].args ) if ( - (_vlu := result.options[arg].value) is None + ((_vlu := result.options[arg].value) is None) or isinstance(_vlu, EllipsisType) ) else _vlu @@ -925,13 +925,16 @@ async def _( await linglun_convert.send(UniMessage.text(ulang.get("convert.start"))) - try: - - progress_bar_style = ( - Musicreater.ProgressBarStyle(**_args["progress-bar"]) - if _args["progress-bar"] - else None + progress_bar_style = ( + Musicreater.ProgressBarStyle(**_args["progress-bar"]) + if ( + _args["progress-bar"] + and ("base_s" in _args["progress-bar"] and _args["progress-bar"]["base_s"]) ) + else None + ) + + try: all_files: dict[str, dict[str, dict[str, int | tuple | str | list]]] = {}