Mai2 Ping fix + extras

This commit is contained in:
Keeboy
2026-06-09 07:03:01 +12:00
parent f2177132bd
commit bfa7ab3d1f
3 changed files with 7 additions and 7 deletions

View File

@@ -121,7 +121,7 @@ class ChuniServlet(BaseServlet):
f"{ChuniConstants.VER_CHUNITHM_LUMINOUS}_chn": 8,
ChuniConstants.VER_CHUNITHM_LUMINOUS_PLUS: 56,
ChuniConstants.VER_CHUNITHM_VERSE: 42,
f"{ChuniConstants.VER_CHUNITHM_VERSE}_chn": 37,
f"{ChuniConstants.VER_CHUNITHM_VERSE}_chn": 31,
ChuniConstants.VER_CHUNITHM_X_VERSE: 14,
f"{ChuniConstants.VER_CHUNITHM_X_VERSE}_int": 96,
}

View File

@@ -1024,3 +1024,6 @@ class Mai2Base:
return {"userId": data["userId"], "userRecommendSelectionMusicIdList": []}
async def handle_get_user_score_ranking_api_request(self, data: Dict) ->Dict:
return {"userId": data["userId"], "userScoreRanking": []}
async def handle_ping_request(self, data: Dict) -> Dict:
return {"returnCode": 1}

View File

@@ -242,8 +242,6 @@ class Mai2Servlet(BaseServlet):
async def handle_mai(self, request: Request) -> bytes:
endpoint: str = request.path_params.get('endpoint')
version: int = request.path_params.get('version')
if endpoint.lower() == "ping":
return Response(zlib.compress(b'{"returnCode": "1"}'))
req_raw = await request.body()
internal_ver = 0
@@ -318,9 +316,6 @@ class Mai2Servlet(BaseServlet):
version: int = request.path_params.get('version')
game_code = request.path_params.get('game')
if endpoint.lower() == "ping":
return Response(zlib.compress(b'{"returnCode": "1"}'))
req_raw = await request.body()
internal_ver = 0
client_ip = Utils.get_ip_addr(request)
@@ -389,8 +384,10 @@ class Mai2Servlet(BaseServlet):
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL
elif version >= 140 and version < 150: # BUDDiES
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
elif version >= 150: # PRiSM
elif version >= 150 and version < 155: # PRiSM
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
elif version >= 155: # PRiSM PLUS
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS
if all(c in string.hexdigits for c in endpoint) and len(endpoint) == 32: