Huge Rewrite!

This commit is contained in:
Remik1r3n
2025-02-02 03:17:13 +08:00
parent 3638de178d
commit 90d8b74c45
28 changed files with 1038 additions and 420 deletions

14
HelperMusicDB.py Normal file
View File

@@ -0,0 +1,14 @@
from MusicDB import musicDB
from loguru import logger
def getMusicTitle(musicId: int) -> str:
'''从数据库获取音乐的标题'''
#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