diff --git a/module/device/connection.py b/module/device/connection.py index 2e19fd286..9be7fbe0f 100644 --- a/module/device/connection.py +++ b/module/device/connection.py @@ -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')