diff --git a/alas.py b/alas.py index 157227658..650f41f22 100644 --- a/alas.py +++ b/alas.py @@ -62,9 +62,10 @@ class AzurLaneAutoScript: logger.exception(e) exit(1) - def run(self, command): + def run(self, command, skip_first_screenshot=False): try: - self.device.screenshot() + if not skip_first_screenshot: + self.device.screenshot() self.__getattribute__(command)() return True except TaskEnd: diff --git a/module/webui/process_manager.py b/module/webui/process_manager.py index 3b260565a..7256e1dea 100644 --- a/module/webui/process_manager.py +++ b/module/webui/process_manager.py @@ -153,7 +153,7 @@ class ProcessManager: elif func in get_available_func(): from alas import AzurLaneAutoScript - AzurLaneAutoScript(config_name=config_name).run(inflection.underscore(func)) + AzurLaneAutoScript(config_name=config_name).run(inflection.underscore(func), skip_first_screenshot=True) elif func in get_available_mod(): mod = load_mod(func)