1
0
forked from Hay1tsme/artemis

fixing get_allnet_info for cxb, sao and ongeki

This commit is contained in:
Midorica 2023-11-13 10:43:38 -05:00
parent 1a4dc88c8a
commit 1034a505f0
3 changed files with 6 additions and 6 deletions

View File

@ -77,7 +77,7 @@ class CxbServlet(BaseServlet):
return True return True
def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]:
if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg) != 443: if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg):
return ( return (
f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}", f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}",
"", "",

View File

@ -132,10 +132,10 @@ class OngekiServlet(BaseServlet):
proto = "https" if self.game_cfg.server.use_https and game_ver >= 120 else "http" proto = "https" if self.game_cfg.server.use_https and game_ver >= 120 else "http"
if proto == "https": if proto == "https":
t_port = f":{title_port_ssl_int}" if title_port_ssl_int != 443 and not self.core_cfg.server.is_using_proxy else "" t_port = f":{title_port_ssl_int}" if title_port_ssl_int and not self.core_cfg.server.is_using_proxy else ""
else: else:
t_port = f":{title_port_int}" if title_port_int != 80 and not self.core_cfg.server.is_using_proxy else "" t_port = f":{title_port_int}" if title_port_int and not self.core_cfg.server.is_using_proxy else ""
return ( return (
f"{proto}://{self.core_cfg.title.hostname}{t_port}/{game_code}/{game_ver}/", f"{proto}://{self.core_cfg.title.hostname}{t_port}/{game_code}/{game_ver}/",
@ -252,7 +252,7 @@ class OngekiServlet(BaseServlet):
zipped = zlib.compress(json.dumps(resp, ensure_ascii=False).encode("utf-8")) zipped = zlib.compress(json.dumps(resp, ensure_ascii=False).encode("utf-8"))
if not encrtped or version < 120: if not encrtped and version < 120:
return zipped return zipped
padded = pad(zipped, 16) padded = pad(zipped, 16)

View File

@ -76,7 +76,7 @@ class SaoServlet(BaseServlet):
return True return True
def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]:
if not self.core_cfg.server.is_using_proxy and self.core_cfg.title.port_ssl: if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg):
return ( return (
f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}/", f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}/",
f"{self.core_cfg.title.hostname}/", f"{self.core_cfg.title.hostname}/",