feat:触屏版显示界面的歌曲id支持配置
This commit is contained in:
parent
0414830539
commit
e84ee5de1e
@ -81,6 +81,8 @@ class Config:
|
|||||||
use_music_api: bool = (
|
use_music_api: bool = (
|
||||||
os.getenv("XIAOMUSIC_USE_MUSIC_API", "false").lower() == "true"
|
os.getenv("XIAOMUSIC_USE_MUSIC_API", "false").lower() == "true"
|
||||||
)
|
)
|
||||||
|
use_music_audio_id: str = os.getenv("XIAOMUSIC_USE_MUSIC_AUDIO_ID", "1582971365183456177")
|
||||||
|
use_music_id: str = os.getenv("XIAOMUSIC_USE_MUSIC_ID", "355454500")
|
||||||
log_file: str = os.getenv("XIAOMUSIC_MUSIC_LOG_FILE", "/tmp/xiaomusic.txt")
|
log_file: str = os.getenv("XIAOMUSIC_MUSIC_LOG_FILE", "/tmp/xiaomusic.txt")
|
||||||
# 模糊搜索匹配的最低相似度阈值
|
# 模糊搜索匹配的最低相似度阈值
|
||||||
fuzzy_match_cutoff: float = float(os.getenv("XIAOMUSIC_FUZZY_MATCH_CUTOFF", "0.6"))
|
fuzzy_match_cutoff: float = float(os.getenv("XIAOMUSIC_FUZZY_MATCH_CUTOFF", "0.6"))
|
||||||
|
@ -1039,8 +1039,8 @@ class XiaoMusic:
|
|||||||
if _type == 1:
|
if _type == 1:
|
||||||
# If set to MUSIC, the light will be on
|
# If set to MUSIC, the light will be on
|
||||||
audio_type = "MUSIC"
|
audio_type = "MUSIC"
|
||||||
audio_id = "1582971365183456177"
|
audio_id = self.config.use_music_audio_id
|
||||||
id = "355454500"
|
id = self.config.use_music_id
|
||||||
music = {
|
music = {
|
||||||
"payload": {
|
"payload": {
|
||||||
"audio_type": audio_type,
|
"audio_type": audio_type,
|
||||||
|
Loading…
Reference in New Issue
Block a user