refactor: module imports

This commit is contained in:
mokurin000
2025-07-29 02:27:10 +08:00
parent e99f04c416
commit 12093c9b9b
12 changed files with 651 additions and 512 deletions

View File

@@ -4,11 +4,11 @@ from loguru import logger
def getMusicTitle(musicId: int) -> str:
"""从数据库获取音乐的标题"""
#logger.debug(f"查询歌名: {musicId}")
# logger.debug(f"查询歌名: {musicId}")
musicInfo = musicDB.get(musicId)
if not musicInfo:
logger.warning(f"数据库里未找到此歌曲: {musicId}")
return "R_ERR_MUSIC_ID_NOT_IN_DATABASE"
musicName = musicInfo.get("name")
#logger.debug(f"成功查询到歌名: {musicName}")
return musicName
# logger.debug(f"成功查询到歌名: {musicName}")
return musicName