From d172e5582b3c88d8b526704443c0c091172eedc8 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Tue, 9 May 2023 03:53:31 -0400 Subject: [PATCH] fixup allnet response for res class 2 --- core/allnet.py | 17 +++++++++-------- titles/mai2/index.py | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/allnet.py b/core/allnet.py index ab435e7..31065d2 100644 --- a/core/allnet.py +++ b/core/allnet.py @@ -194,7 +194,7 @@ class AllnetServlet: self.logger.info( f"DownloadOrder from {request_ip} -> {req.game_id} v{req.ver} serial {req.serial}" ) - resp = AllnetDownloadOrderResponse() + resp = AllnetDownloadOrderResponse(serial=req.serial) if ( not self.config.allnet.allow_online_updates @@ -430,6 +430,7 @@ class AllnetPowerOnResponse3: class AllnetPowerOnResponse2: def __init__(self) -> None: + time = datetime.now(tz=pytz.timezone("Asia/Tokyo")) self.stat = 1 self.uri = "" self.host = "" @@ -442,14 +443,14 @@ class AllnetPowerOnResponse2: self.region_name2 = "Y" self.region_name3 = "Z" self.country = "JPN" - self.year = datetime.now().year - self.month = datetime.now().month - self.day = datetime.now().day - self.hour = datetime.now().hour - self.minute = datetime.now().minute - self.second = datetime.now().second + self.year = time.year + self.month = time.month + self.day = time.day + self.hour = time.hour + self.minute = time.minute + self.second = time.second self.setting = "1" - self.timezone = "+0900" + self.timezone = "+09:00" self.res_class = "PowerOnResponseV2" diff --git a/titles/mai2/index.py b/titles/mai2/index.py index e6818de..be73c36 100644 --- a/titles/mai2/index.py +++ b/titles/mai2/index.py @@ -99,7 +99,7 @@ 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}", ) return (