1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-15 16:18:14 +08:00

fix: 新增参数配置强制打断小爱说话

This commit is contained in:
涵曦
2024-07-06 11:16:42 +00:00
parent 86f158532a
commit a4ab1af160
2 changed files with 5 additions and 2 deletions

View File

@@ -344,11 +344,11 @@ class XiaoMusic:
async def stop_if_xiaoai_is_playing(self, device_id):
is_playing = await self.get_if_xiaoai_is_playing(device_id)
if is_playing:
if is_playing or self.config.enable_force_stop:
# stop it
ret = await self.mina_service.player_stop(device_id)
self.log.info(
f"stop_if_xiaoai_is_playing player_stop device_id:{device_id} ret:{ret}"
f"stop_if_xiaoai_is_playing player_stop device_id:{device_id} enable_force_stop:{self.config.enable_force_stop} ret:{ret}"
)
async def force_stop_one_xiaoai(self, device_id):