Skip to content

Commit

Permalink
fix pydantic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed Apr 12, 2024
1 parent 1d82754 commit de0b174
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nonebot-plugin-ncm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Config(BaseModel, extra=Extra.ignore):
ncm_ctcode: int = 86
'''手机号区域码,默认86'''

ncm_password: str = ""
ncm_password: Optional[str] = None
'''密码'''
ncm_bitrate: int = 320
'''下载码率(单位K) 96及以下为m4a,320及以上为flac,中间mp3'''
Expand Down
2 changes: 1 addition & 1 deletion nonebot-plugin-ncm/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ async def start_upload(self, ids: List[int], event: Union[GroupMessageEvent, Pri
elif ncm_config.ncm_phone is None:
logger.warning("您未填写账号,自动进入二维码登录模式")
nncm.get_qrcode()
elif ncm_config.ncm_password == "":
elif ncm_config.ncm_password is None:
logger.warning("您未填写密码,自动进入手机验证码登录模式")
nncm.get_phone_login()
else:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-ncm"
version = "1.6.11"
version = "1.6.12"
description = "基于go-cqhttp与nonebot2的 网易云 无损音乐下载"
license = "Apache License 2.0"
authors = ["kitUIN <[email protected]>"]
Expand Down

0 comments on commit de0b174

Please sign in to comment.