上传文件至 /

This commit is contained in:
2025-10-13 18:15:05 +08:00
parent 2a198c3da6
commit c4e2150acf
18 changed files with 1178 additions and 1 deletions

11
HelperMusicDB.py Normal file
View File

@@ -0,0 +1,11 @@
from MusicDB import musicDB
from loguru import logger
def getMusicTitle(musicId: int) -> str:
musicInfo = musicDB.get(musicId)
if not musicInfo:
logger.warning(f"数据库里未找到此歌曲: {musicId}")
return "R_ERR_MUSIC_ID_NOT_IN_DATABASE"
musicName = musicInfo.get("name")
return musicName