Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autowsgr/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.5.7'
__version__ = '1.5.8'
7 changes: 2 additions & 5 deletions autowsgr/timer/controllers/os_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down