mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Opt: Auto package detection when cloud game and android game both installed
This commit is contained in:
parent
2d0b67271d
commit
0242feead6
@ -1016,7 +1016,24 @@ class Connection(ConnectionAttr):
|
||||
# Set server
|
||||
# logger.info('Server changed, release resources')
|
||||
# set_server(self.package)
|
||||
return
|
||||
else:
|
||||
if self.config.is_cloud_game:
|
||||
packages = [p for p in packages if p in server_.VALID_CLOUD_PACKAGE]
|
||||
if len(packages) == 1:
|
||||
logger.info('Auto package detection found only one package, using it')
|
||||
self.package = packages[0]
|
||||
if set_config:
|
||||
self.config.Emulator_PackageName = server_.to_server(self.package)
|
||||
return
|
||||
else:
|
||||
packages = [p for p in packages if p in server_.VALID_PACKAGE]
|
||||
if len(packages) == 1:
|
||||
logger.info('Auto package detection found only one package, using it')
|
||||
self.package = packages[0]
|
||||
if set_config:
|
||||
self.config.Emulator_PackageName = server_.to_server(self.package)
|
||||
return
|
||||
logger.critical(
|
||||
f'Multiple Star Rail packages found, auto package detection cannot decide which to choose, '
|
||||
'please copy one of the available devices listed above to Alas.Emulator.PackageName')
|
||||
|
Loading…
Reference in New Issue
Block a user