From 22745da55badecaca979ebe2b64117b6b7d4b0b0 Mon Sep 17 00:00:00 2001 From: roaz Date: Mon, 13 May 2024 17:15:32 +0000 Subject: [PATCH 1/2] chuni: Fix endpoint for older version of SDGS --- titles/chuni/index.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/titles/chuni/index.py b/titles/chuni/index.py index f781898..f0f1eac 100644 --- a/titles/chuni/index.py +++ b/titles/chuni/index.py @@ -195,11 +195,11 @@ class ChuniServlet(BaseServlet): internal_ver = ChuniConstants.VER_CHUNITHM_NEW_PLUS elif version >= 210 and version < 215: # SUN internal_ver = ChuniConstants.VER_CHUNITHM_SUN - elif version >= 215: # SUN + elif version >= 215: # SUN PLUS internal_ver = ChuniConstants.VER_CHUNITHM_SUN_PLUS elif game_code == "SDGS": # Int - if version < 110: # SUPERSTAR - internal_ver = ChuniConstants.VER_CHUNITHM_PARADISE # FIXME: Not sure what was intended to go here? was just "PARADISE" + if version < 110: # SUPERSTAR / SUPERSTAR PLUS + internal_ver = ChuniConstants.VER_CHUNITHM_PARADISE # SUPERSTAR / SUPERSTAR PLUS worked fine with it elif version >= 110 and version < 115: # NEW internal_ver = ChuniConstants.VER_CHUNITHM_NEW elif version >= 115 and version < 120: # NEW PLUS!! @@ -272,11 +272,13 @@ class ChuniServlet(BaseServlet): self.logger.info(f"v{version} {endpoint} request from {client_ip}") self.logger.debug(req_data) - endpoint = ( - endpoint.replace("C3Exp", "") - if game_code == "SDGS" - else endpoint - ) + if game_code == "SDGS" and version >= 110: + endpoint = endpoint.replace("C3Exp", "") + elif game_code == "SDGS" and version < 110: + endpoint = endpoint.replace("Exp", "") + else: + endpoint = endpoint + func_to_find = "handle_" + inflection.underscore(endpoint) + "_request" handler_cls = self.versions[internal_ver](self.core_cfg, self.game_cfg) -- 2.39.2 From 632357598c7b30dcc1b0af6e7d4c56622ceb2b0e Mon Sep 17 00:00:00 2001 From: roaz Date: Mon, 13 May 2024 19:46:03 +0000 Subject: [PATCH 2/2] Update readme.md --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 114fef5..505f241 100644 --- a/readme.md +++ b/readme.md @@ -10,6 +10,7 @@ Games listed below have been tested and confirmed working. Only game versions ol + CHUNITHM INTL + SUPERSTAR + + SUPERSTAR PLUS + NEW + NEW PLUS + SUN -- 2.39.2