From d0242b456db2cce1d3c98097ecd68158d6e854e4 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Wed, 3 May 2023 22:29:08 -0400 Subject: [PATCH] mai2: fix for dx 1.00 --- titles/mai2/base.py | 9 ++++++++- titles/mai2/index.py | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/titles/mai2/base.py b/titles/mai2/base.py index 171378c..44ec60d 100644 --- a/titles/mai2/base.py +++ b/titles/mai2/base.py @@ -16,8 +16,15 @@ class Mai2Base: self.version = Mai2Constants.VER_MAIMAI_DX self.data = Mai2Data(cfg) self.logger = logging.getLogger("mai2") + + if self.core_config.server.is_develop and self.core_config.title.port > 0: + self.old_server = f"http://{self.core_config.title.hostname}:{self.core_config.title.port}/SDEY/100/" + + else: + self.old_server = f"http://{self.core_config.title.hostname}/SDEY/100/" def handle_get_game_setting_api_request(self, data: Dict): + # TODO: See if making this epoch 0 breaks things reboot_start = date.strftime( datetime.now() + timedelta(hours=3), Mai2Constants.DATE_TIME_FORMAT ) @@ -34,7 +41,7 @@ class Mai2Base: "movieStatus": 0, "movieServerUri": "", "deliverServerUri": "", - "oldServerUri": "", + "oldServerUri": self.old_server, "usbDlServerUri": "", "rebootInterval": 0, }, diff --git a/titles/mai2/index.py b/titles/mai2/index.py index 1b92842..3326843 100644 --- a/titles/mai2/index.py +++ b/titles/mai2/index.py @@ -82,13 +82,13 @@ class Mai2Servlet: return ( True, f"http://{core_cfg.title.hostname}:{core_cfg.title.port}/{game_code}/$v/", - f"{core_cfg.title.hostname}:{core_cfg.title.port}/", + f"{core_cfg.title.hostname}:{core_cfg.title.port}", ) return ( True, f"http://{core_cfg.title.hostname}/{game_code}/$v/", - f"{core_cfg.title.hostname}/", + f"{core_cfg.title.hostname}", ) def render_POST(self, request: Request, version: int, url_path: str) -> bytes: