Skip to content

Commit

Permalink
fix: #91 修复下载歌曲报错
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Jun 30, 2024
1 parent 7c45d93 commit edafd79
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xiaomusic/xiaomusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ async def do_set_volume(self, value):
async def force_stop_xiaoai(self):
ret = await self.mina_service.player_pause(self.device_id)
self.log.debug(f"force_stop_xiaoai player_pause ret:{ret}")
#ret = await self.mina_service.player_stop(self.device_id)
#self.log.debug(f"force_stop_xiaoai player_stop ret:{ret}")
# ret = await self.mina_service.player_stop(self.device_id)
# self.log.debug(f"force_stop_xiaoai player_stop ret:{ret}")

# 是否在下载中
def is_downloading(self):
Expand Down Expand Up @@ -703,6 +703,7 @@ def find_real_music_name(self, name):
self.log.info(f"根据【{name}】找到歌曲【{real_name}】")
return real_name
self.log.info(f"没找到歌曲【{name}】")
return name

# 播放本地歌曲
async def playlocal(self, **kwargs):
Expand Down Expand Up @@ -759,7 +760,7 @@ async def play(self, **kwargs):
await self.do_tts(f"本地不存在歌曲{name}")
return
await self.download(search_key, name)
self.log.info("正在下载中 %s", search_key + ":" + name)
self.log.info(f"正在下载中 {search_key} {name}")
await self.download_proc.wait()
# 把文件插入到播放列表里
self.add_download_music(name)
Expand Down

0 comments on commit edafd79

Please sign in to comment.