mai2: defined correct uri to DX
This commit is contained in:
parent
b406ebb833
commit
52a9cce585
|
@ -5,6 +5,7 @@ import json
|
|||
from random import randint
|
||||
|
||||
from core.config import CoreConfig
|
||||
from core.utils import Utils
|
||||
from titles.mai2.base import Mai2Base
|
||||
from titles.mai2.config import Mai2Config
|
||||
from titles.mai2.const import Mai2Constants
|
||||
|
@ -15,6 +16,13 @@ class Mai2DX(Mai2Base):
|
|||
super().__init__(cfg, game_cfg)
|
||||
self.version = Mai2Constants.VER_MAIMAI_DX
|
||||
|
||||
# DX earlier version need a efficient old server uri to work
|
||||
if not self.core_config.server.is_using_proxy and Utils.get_title_port(self.core_config) != 80:
|
||||
self.old_server = f"http://{self.core_config.server.hostname}:{Utils.get_title_port(cfg)}/197/"
|
||||
|
||||
else:
|
||||
self.old_server = f"http://{self.core_config.server.hostname}/197/"
|
||||
|
||||
async def handle_get_game_setting_api_request(self, data: Dict):
|
||||
# if reboot start/end time is not defined use the default behavior of being a few hours ago
|
||||
if self.core_config.title.reboot_start_time == "" or self.core_config.title.reboot_end_time == "":
|
||||
|
@ -50,7 +58,7 @@ class Mai2DX(Mai2Base):
|
|||
"movieStatus": 1,
|
||||
"movieServerUri": "",
|
||||
"deliverServerUri": "",
|
||||
"oldServerUri": self.old_server + "old",
|
||||
"oldServerUri": self.old_server,
|
||||
"usbDlServerUri": "",
|
||||
"rebootInterval": 0,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue