forked from Hay1tsme/artemis
fixing get_allnet_info for cxb, sao and ongeki
This commit is contained in:
parent
1a4dc88c8a
commit
1034a505f0
@ -77,7 +77,7 @@ class CxbServlet(BaseServlet):
|
||||
return True
|
||||
|
||||
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 (
|
||||
f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}",
|
||||
"",
|
||||
|
@ -132,10 +132,10 @@ class OngekiServlet(BaseServlet):
|
||||
proto = "https" if self.game_cfg.server.use_https and game_ver >= 120 else "http"
|
||||
|
||||
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:
|
||||
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 (
|
||||
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"))
|
||||
|
||||
if not encrtped or version < 120:
|
||||
if not encrtped and version < 120:
|
||||
return zipped
|
||||
|
||||
padded = pad(zipped, 16)
|
||||
|
@ -76,7 +76,7 @@ class SaoServlet(BaseServlet):
|
||||
return True
|
||||
|
||||
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 (
|
||||
f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}/",
|
||||
f"{self.core_cfg.title.hostname}/",
|
||||
|
Loading…
Reference in New Issue
Block a user