1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-28 17:24:04 +08:00

Fix: Device auto detection on LDPlayer

This commit is contained in:
LmeSzinc
2022-06-11 22:01:26 +08:00
parent 53910a728c
commit 412f6385e1

View File

@@ -632,11 +632,11 @@ class Connection:
# Auto device detection # Auto device detection
if self.config.Emulator_Serial == 'auto': if self.config.Emulator_Serial == 'auto':
if len(devices) == 0: if available.count == 0:
logger.critical('No available device found, auto device detection cannot work, ' logger.critical('No available device found, auto device detection cannot work, '
'please set an exact serial in Alas.Emulator.Serial instead of using "auto"') 'please set an exact serial in Alas.Emulator.Serial instead of using "auto"')
raise RequestHumanTakeover raise RequestHumanTakeover
elif len(devices) == 1: elif available.count == 1:
logger.info(f'Auto device detection found only one device, using it') logger.info(f'Auto device detection found only one device, using it')
self.serial = devices[0].serial self.serial = devices[0].serial
del_cached_property(self, 'adb') del_cached_property(self, 'adb')