diff --git a/autowsgr/__init__.py b/autowsgr/__init__.py index 7bf38315..340fb6f2 100644 --- a/autowsgr/__init__.py +++ b/autowsgr/__init__.py @@ -1 +1 @@ -__version__ = '1.5.7' +__version__ = '1.5.8' diff --git a/autowsgr/timer/controllers/os_controller.py b/autowsgr/timer/controllers/os_controller.py index 6b6c7b00..e279a217 100644 --- a/autowsgr/timer/controllers/os_controller.py +++ b/autowsgr/timer/controllers/os_controller.py @@ -106,10 +106,7 @@ def is_android_online(self) -> bool: return raw_res == 'running' case EmulatorType.mumu: raw_res = self.__mumuconsole('is_android_started') - try: - raw_res = json.loads(raw_res)['player_state'] == 'start_finished' - except KeyError: - raw_res = False + raw_res = json.loads(raw_res)['is_android_started'] self.logger.debug('EmulatorType status: ' + f'{raw_res}') return raw_res case EmulatorType.yunshouji: @@ -215,7 +212,7 @@ def __mumuconsole(self, command, command_arg='', global_command=False) -> str: # :rtype: str console_dir = os.path.join(os.path.dirname(self.emulator_start_cmd), 'MuMuManager.exe') num = int(re.search(r'[:-]\s*(\d+)', self.emulator_name).group(1)) - emulator_index = (num - 16384) // 32 if num >= 16384 else (num - 5555) // 2 + emulator_index = (num - 16384) / 32 if num >= 16384 else (num - 5554) / 2 order = 'info' if command == 'is_android_started' else 'control' if not global_command: