Skip to content

Commit

Permalink
feat: 尝试解决触屏版无法播放的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Jul 2, 2024
1 parent 7f4e51b commit e976393
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions xiaomusic/xiaomusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,10 +1042,23 @@ async def play_by_music_url(self, deviceId, url, _type=2):
audio_id = "1741636975854617441"
music = {
"payload": {
"audio_type": audio_type,
"audio_items": [
{"item_id": {"audio_id": audio_id}, "stream": {"url": url}}
{
"item_id": {
"audio_id": audio_id,
"cp": {
"album_id": "-1",
"episode_index": 0,
"id": "372639235",
"name": "xiaowei",
},
},
"stream": {
"url": "http://ngcdn001.cnr.cn/live/zgzs/index.m3u8"
},
}
],
"audio_type": audio_type,
}
}
data = {"startaudioid": audio_id, "music": json.dumps(music)}
Expand Down

0 comments on commit e976393

Please sign in to comment.