From 7fb98118b26fd1b41737b2f68b7c231ac6b3171e Mon Sep 17 00:00:00 2001 From: Midorica Date: Sat, 25 Nov 2023 13:23:39 -0500 Subject: [PATCH] cxb: fixing index and rss2 /data handler --- titles/cxb/index.py | 4 ++-- titles/cxb/rss2.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/titles/cxb/index.py b/titles/cxb/index.py index 4a1489c..af728c6 100644 --- a/titles/cxb/index.py +++ b/titles/cxb/index.py @@ -175,8 +175,8 @@ class CxbServlet(BaseServlet): internal_ver = CxbConstants.VER_CROSSBEATS_REV_SUNRISE_S2 if not hasattr(self.versions[internal_ver], func_to_find): - self.logger.warn(f"{version_string} has no handler for filetype {filetype}") - return "" + self.logger.warn(f"{version_string} has no handler for filetype {filetype} / {func_to_find}") + return({"data":""}) self.logger.info(f"{version_string} request for filetype {filetype}") self.logger.debug(req_json) diff --git a/titles/cxb/rss2.py b/titles/cxb/rss2.py index 923b019..85cca85 100644 --- a/titles/cxb/rss2.py +++ b/titles/cxb/rss2.py @@ -120,9 +120,14 @@ class CxbRevSunriseS2(CxbBase): return {"data": ret_str} def handle_data_extra_stage_list_request(self, data: Dict) -> Dict: - return {"data": ""} + ret_str="" + with open(r"titles/cxb/data/rss2/ExtraStageList.csv") as extra: + lines = extra.readlines() + for line in lines: + ret_str += f"{line[:-1]}\r\n" + return({"data":ret_str}) - def handle_data_ex0001_request(self, data: Dict) -> Dict: + def handle_data_exxxxx_request(self, data: Dict) -> Dict: return {"data": ""} def handle_data_one_more_extra_list_request(self, data: Dict) -> Dict: @@ -131,7 +136,7 @@ class CxbRevSunriseS2(CxbBase): def handle_data_bonus_list10100_request(self, data: Dict) -> Dict: return {"data": ""} - def handle_data_oe0001_request(self, data: Dict) -> Dict: + def handle_data_oexxxx_request(self, data: Dict) -> Dict: return {"data": ""} def handle_data_free_coupon_request(self, data: Dict) -> Dict: