Skip to content

Commit

Permalink
fix: 修复播放接口参数错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Dec 3, 2024
1 parent 7eb0ab1 commit 78dbba6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xiaomusic/xiaomusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,12 +1014,12 @@ async def play(self, did="", arg1="", **kwargs):
parts = arg1.split("|")
search_key = parts[0]
name = parts[1] if len(parts) > 1 else search_key
if name == "":
if not name:
name = search_key

return await self.do_play(name, search_key)
return await self.do_play(did, name, search_key)

async def do_play(self, did, name, search_key):
async def do_play(self, did, name, search_key=""):
return await self.devices[did].play(name, search_key)

# 本地播放
Expand Down

0 comments on commit 78dbba6

Please sign in to comment.