From 20696eaa9d16fb4854530253e74e8b74702e519a Mon Sep 17 00:00:00 2001 From: helloplhm-qwq Date: Fri, 5 Jan 2024 19:23:19 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E8=B4=A6=E5=8F=B7=E6=B1=A0=E5=90=8E=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/kg/player.py | 2 +- modules/kg/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/kg/player.py b/modules/kg/player.py index 1cff27d..f4d8dee 100644 --- a/modules/kg/player.py +++ b/modules/kg/player.py @@ -47,7 +47,7 @@ async def url(songId, quality): 'behavior': 'play', 'clienttime': int(time.time()), 'pid': 2, - 'key': getKey(thash), + 'key': getKey(thash, user_info), 'dfid': '-', 'pidversion': 3001 } diff --git a/modules/kg/utils.py b/modules/kg/utils.py index b9f4987..c61149b 100644 --- a/modules/kg/utils.py +++ b/modules/kg/utils.py @@ -57,5 +57,5 @@ async def signRequest(url, params, options, signkey = tools["signkey"]): url = url + "?" + buildRequestParams(params) return await Httpx.AsyncRequest(url, options) -def getKey(hash_): - return utils.createMD5(hash_.lower() + tools.pidversec + tools.appid + tools.mid + tools.userid) +def getKey(hash_, user_info): + return utils.createMD5(hash_.lower() + tools.pidversec + tools.appid + user_info['mid'] + user_info['userid'])